LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	y2038 Mailman List <y2038@lists.linaro.org>,
	linux-rtc@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] rtc: vr41xx: remove mktime usage
Date: Wed, 16 May 2018 23:43:48 -0400	[thread overview]
Message-ID: <CAK8P3a0JG10ABKBV1XWWOaZJOZz7zR-0TDmPXtdZ1-JNzP5OkA@mail.gmail.com> (raw)
In-Reply-To: <20180516135500.GE3254@piout.net>

On Wed, May 16, 2018 at 9:55 AM, Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
> Hi,
>
> On 20/04/2018 18:14:24+0200, Arnd Bergmann wrote:
>> This driver uses mktime() and rtc_time_to_tm() to convert between time
>> values. This works fine on 64-bit kernels over the whole supported
>> range, and the vr41xx chip is a 64-bit MIPS implementation, but it is
>> inconsistent because it doesn't do the same thing on 32-bit kernels that
>> overflow in 2106 or 2038.
>>
>> Changing it to use mktime64/rtc_time64_to_tm() should have no visible
>> impact on vr41xx but gets us closer to removing the 32-bit interfaces.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>  drivers/rtc/rtc-vr41xx.c | 24 ++++++++++++------------
>>  1 file changed, 12 insertions(+), 12 deletions(-)
>>
>
> I've applied the series a while ago.

Thanks! We should be able to remove mktime() in the near future then,
along with some other interfaces from linux/time32.h and linux/timekeeping32.h.

> It should be noted that mktime64
> will fail on 32bit platforms in year 21000 or so but I pretty sure it is
> not worth fixing. My understanding is that the kernel will fail in April
> 2262 anyway as ktime_t will overflow.

Right.

> Note that I will be following up with multiple series adding proper
> rtc HW range, removing set_mmss and rtc_time_to_tm/rtc_tm_to_time64.

Ok, looking forward to those patches!

        Arnd

      reply	other threads:[~2018-05-17  3:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 16:14 Arnd Bergmann
2018-04-20 16:14 ` [PATCH 2/3] rtc: ls1x: " Arnd Bergmann
2018-04-20 16:14 ` [PATCH 3/3] rtc: tps6586x: " Arnd Bergmann
2018-05-16 13:55 ` [PATCH 1/3] rtc: vr41xx: " Alexandre Belloni
2018-05-17  3:43   ` Arnd Bergmann [this message]

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=CAK8P3a0JG10ABKBV1XWWOaZJOZz7zR-0TDmPXtdZ1-JNzP5OkA@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=y2038@lists.linaro.org \
    --subject='Re: [PATCH 1/3] rtc: vr41xx: remove mktime usage' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).