From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Alessandro Zummo <a.zummo@towertech.it>
Cc: Rob Herring <robh@kernel.org>,
rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038
Date: Tue, 19 Jan 2016 21:16:11 +0100 [thread overview]
Message-ID: <87si1tcol0.fsf@belgarion.home> (raw)
In-Reply-To: <1453165031-29194-1-git-send-email-alexandre.belloni@free-electrons.com> (Alexandre Belloni's message of "Tue, 19 Jan 2016 01:57:11 +0100")
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
next prev parent reply other threads:[~2016-01-19 20:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 0:57 [PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038 Alexandre Belloni
2016-01-19 20:16 ` Robert Jarzmik [this message]
2016-01-19 20:46 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87si1tcol0.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox