rtc: Optimize calculations in rtc_time64_to_tm()
Recently (in commit 7df4cfef ("rtc: Make rtc_time64_to_tm() support dates before 1970")) the function rtc_time64_to_tm() was repaired for times before 1970. This introduced two if blocks. Cassio Neri pointed out that to be not neccessary and suggested an adaption that allows to drop the two branch points again. This is implemented here. Also adapt the reference to the theoretical paper to link to the final published article instead of the preprint on Cassio's request. Suggested-by:Cassio Neri <cassio.neri@gmail.com> Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20250613142405.253420-2-u.kleine-koenig@baylibre.com Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com>
Loading
Please sign in to comment