lkml.org 
[lkml]   [2015]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2015-04-15 12:01    [W:0.132 / U:20.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site