Messages in this thread | | | Date | Wed, 15 Apr 2015 10:35:10 +0100 | From | Russell King - ARM Linux <> | Subject | Re: [PATCH 4/5] drivers/rtc/pl030: Replace deprecated rtc_tm_to_time() and rtc_time_to_tm() |
| |
On Wed, Apr 15, 2015 at 05:20:10PM +0800, Xunlei Pang wrote: > From: Xunlei Pang <pang.xunlei@linaro.org> > > The driver uses deprecated rtc_tm_to_time() and rtc_time_to_tm(), > which will overflow in year 2106 on 32-bit machines. > > This patch solves this by: > - Replacing rtc_tm_to_time() with rtc_tm_to_time64() > - Replacing rtc_time_to_tm() with rtc_time64_to_tm() > > Cc: Russell King <rmk+kernel@arm.linux.org.uk> > Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
NAK.
How does this fix anything? The RTC contains 32-bit registers. Even if you convert the struct tm to a 64-bit time, you can only write the lowest 32-bits to the hardware. You can onyl read the lowest 32-bits from the hardware too.
This patch solves /nothing/. In fact, it hides the fact that this RTC is unable to represent dates after 2106.
-- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
| |