lkml.org 
[lkml]   [2016]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038
Date
Alexandre Belloni <alexandre.belloni@free-electrons.com> writes:

> rcnr will overflow in 2038, detect that overflow when setting the time and
> get rid of the deprecated rtc_tm_to_time()
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Hi Alexandre,

That's very nice, but doesn't that limitation touch almost all drivers, and
could benefit from a global solution in rtc_set_time() ?

What I'm thinking of is a field in rtc_device, a u64 which represents the
maximal time that can be set (or 0 if no maximum). rtc_set_time() would check
against that maximum and return -EINVAL.

For the rtc drivers, upon registration they can modify this value to set up this
clamp. This will require to set only a value in each driver, which looks more
robust to me.

Alessandro, what do you think ?

Cheers.

--
Robert

\
 
 \ /
  Last update: 2016-01-19 21:41    [W:0.055 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site