Re: [PATCH v3 3/4] rtc: lib: Implement rtc_time64_to_tm() in terms of time64_to_tm()

From: Alexandre Belloni

Date: Tue Dec 01 2026 - 10:10:09 EST


On 01/12/2026 10:05:36+0100, Thomas Weißschuh (Schneider Electric) wrote:
> On Mon, Nov 30, 2026 at 09:22:32PM +0100, Alexandre Belloni wrote:
> > On 30/11/2026 15:20:49+0100, Thomas Weißschuh (Schneider Electric) wrote:
> > > The core timekeeping code already provides a function to convert seconds
> > > since the epoch to a 'struct tm'. This can be reused for a the
> > > 'struct rtc_time' conversion.
> > >
> > > time64_to_tm() can handle a larger range of dates. It is also
> > > 20% slower, but this function is not a hot-path anyways.
> > > On the other hand this saves ~600 bytes of .text.
> > >
> >
> > While not in the hot path, this is actually time sensitive which is why
> > I always hesitated doing this change.
>
> time64_to_tm() has been optimized by Cassio recently.
> So the absolute performance should be much better than the original
> rtc_time64_to_tm().
>
> > I guess I'll apply both RTC patches in my tree.
>
> The full series has already been picked up through the tip tree.

Was that so urgent that this had to be applied right away?


--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com