On Wed, Apr 15, 2015 at 05:20:10PM +0800, Xunlei Pang wrote:
> From: Xunlei Pang <pang.xun...@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+ker...@arm.linux.org.uk>
> Signed-off-by: Xunlei Pang <pang.xun...@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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to