From: sashiko-bot@kernel.org
To: "Thorsten Blum" <blum@kernel.org>
Cc: linux-rtc@vger.kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] rtc: gamecube: Fix supported time range in gamecube_rtc_probe()
Date: Mon, 02 Nov 2026 02:25:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-192834@kernel.org> (raw)
In-Reply-To: <20261102022110.206609-2-blum@kernel.org>
> gamecube_rtc_read_time() adds the SRAM bias to the 32-bit RTC counter.
> However, gamecube_rtc_probe() sets the supported time range from 0 to
> U32_MAX without taking the bias into account.
>
> gamecube_rtc_set_time() subtracts the bias from the timestamp, and if
> the timestamp is smaller than the bias, the result is negative and wraps
> when passed to regmap_write(), storing the wrong time.
>
> Add the bias to the supported range to match gamecube_rtc_read_time()
> and gamecube_rtc_set_time(). Setting a time below the bias now returns
> -ERANGE. This also allows setting dates beyond the 2106 limit. Update
> the comment accordingly.
>
> Fixes: 86559400b3ef ("rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U")
> Cc: stable@vger.kernel.org
> Signed-off-by: Thorsten Blum <blum@kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102022110.206609-2-blum@kernel.org?part=1
prev parent reply other threads:[~2026-11-02 2:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 2:21 [PATCH] rtc: gamecube: Fix supported time range in gamecube_rtc_probe() Thorsten Blum
2026-11-02 2:25 ` sashiko-bot [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=sashiko-outbox-192834@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=blum@kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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