lkml.org 
[lkml]   [2021]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] RTC changes for 5.15
On Sat, Sep 11, 2021 at 8:59 AM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> The broken down time conversion is similar to what is done
> in the time subsystem since v5.14.

By "similar" you mean "identical", no?

Why is the rtc subsystem not just using the generic time64_to_tm()?

Yes, yes, I realize that due to historical mistakes, there's a
duplicate 'struct rtc_time' struct, but it turns out that that is
_identical_ to 'struct tm' except it also has a 'int tm_isdst' at the
end.

So you could literally make a union of the two, pass the 'struct tm'
part down to the generic code, and just do

rtc_tm->tm_isdst = 0;

at the end.

Rather than have a duplicate copy of that admittedly clever Neri and
Schneider algorithm.

Hmm?

Linus

\
 
 \ /
  Last update: 2021-09-11 19:06    [W:0.041 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site