Skip to content

rtc: backport support for handling dates before 1970

Uwe Kleine-König linux-rtc stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rtc: Improve performance of rtc_time64_to_tm(). Add tests.drivers/rtc/Kconfig drivers/rtc/Makefile drivers/rtc/lib.c +1 more+168 -251 reply
2/3rtc: Make rtc_time64_to_tm() support dates before 1970drivers/rtc/lib.c+19 -55 replies
3/3rtc: Fix offset calculation for .start_secs < 0drivers/rtc/class.c+1 -11 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchUwe Kleine-König
1/3
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 5.10.y 0/3] rtc: backport support for handling dates before 1970

Hello,

this is a followup to
https://lore.kernel.org/stable/[email protected]
that handled backporting the two patches by Alexandre to the active stable kernels between 6.15 and 5.15. Here comes a backport to 5.10.y, git am handles application to 5.4.y just fine.

Compared to the backport for later kernels I included a major rework of rtc_time64_to_tm() by Cassio Neri. (FTR: I checked, that commit by Cassio Neri isn't the reason we need to fix rtc_time64_to_tm(), the actual problem is older.)

Now that I completed the backport and did some final checks on it I noticed that the problem fixed here is (TTBOMK) a theoretic one because only drivers with .start_secs < 0 are known to have issues and in 5.10 and before there is no such driver. I'm uncertain if this should result in not backporting the changes. I would tend to pick them anyhow, but I won't argue on a veto.

Best regards
Uwe

Alexandre Mergnat (2):
rtc: Make rtc_time64_to_tm() support dates before 1970
rtc: Fix offset calculation for .start_secs < 0

Cassio Neri (1):
rtc: Improve performance of rtc_time64_to_tm(). Add tests.

 drivers/rtc/Kconfig    |  10 ++++
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/class.c    |   2 +-
 drivers/rtc/lib.c      | 121 ++++++++++++++++++++++++++++++++---------
 drivers/rtc/lib_test.c |  79 +++++++++++++++++++++++++++
 5 files changed, 185 insertions(+), 28 deletions(-)
 create mode 100644 drivers/rtc/lib_test.c

base-commit: 01e7e36b8606e5d4fddf795938010f7bfa3aa277

Signature · 1 line
2.49.0