linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Alexandre Mergnat <amergnat@baylibre.com>,
	Cassio Neri <cassio.neri@gmail.com>,
	stable@vger.kernel.org, linux-rtc@vger.kernel.org
Subject: [PATCH 5.10.y 0/3] rtc: backport support for handling dates before 1970
Date: Tue, 10 Jun 2025 09:34:57 +0200	[thread overview]
Message-ID: <cover.1749539184.git.u.kleine-koenig@baylibre.com> (raw)

Hello,

this is a followup to
https://lore.kernel.org/stable/cover.1749223334.git.u.kleine-koenig@baylibre.com
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
-- 
2.49.0


             reply	other threads:[~2025-06-10  7:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10  7:34 Uwe Kleine-König [this message]
2025-06-10  7:34 ` [PATCH 5.10.y 1/3] rtc: Improve performance of rtc_time64_to_tm(). Add tests Uwe Kleine-König
2025-06-10  7:34 ` [PATCH 5.10.y 2/3] rtc: Make rtc_time64_to_tm() support dates before 1970 Uwe Kleine-König
2025-06-10 20:33   ` Cassio Neri
     [not found]   ` <CAOfgUPg0Z6e5+awuqVMa7QUPiJ7aPp-dX6QNk80Y-bhpBYcsoQ@mail.gmail.com>
2025-06-11  6:08     ` Uwe Kleine-König
2025-06-11  7:33     ` Alexandre Belloni
2025-06-11 18:32       ` Cassio Neri
2025-06-10  7:35 ` [PATCH 5.10.y 3/3] rtc: Fix offset calculation for .start_secs < 0 Uwe Kleine-König

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=cover.1749539184.git.u.kleine-koenig@baylibre.com \
    --to=u.kleine-koenig@baylibre.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=amergnat@baylibre.com \
    --cc=cassio.neri@gmail.com \
    --cc=linux-rtc@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).