From: Thomas Gleixner <tglx@kernel.org>
To: Mark Brown <broonie@kernel.org>, Jinjie Ruan <ruanjinjie@huawei.com>
Cc: jstultz@google.com, sboyd@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kunit: time: use is_leap_year() helper
Date: Fri, 30 Jan 2026 22:13:53 +0100 [thread overview]
Message-ID: <87h5s2hkha.ffs@tglx> (raw)
In-Reply-To: <f200cf10-0905-4e2b-b0b6-62b0f67ff2bf@sirena.org.uk>
On Fri, Jan 30 2026 at 19:39, Mark Brown wrote:
> On Fri, Jan 30, 2026 at 03:11:17PM +0000, Mark Brown wrote:
>> On Fri, Jan 23, 2026 at 04:09:40PM +0800, Jinjie Ruan wrote:
>>
>> > Use the is_leap_year() helper from rtc.h instead of
>> > writing it by hand
>
>> This patch introduces a regression:
>
>> > -static bool is_leap(long year)
>
>> gets replaced by is_leap_year() which is:
>
>> static inline bool is_leap_year(unsigned int year)
>
>> which looks like it ought to work out the same from a quick look
>> although it is written less clearly. I'll look properly later when I've
>> got through the rest of the pile of regressions.
>
> The issue here is, of course, the change from using long for the new to
> using unsigned long. The test is considering times up to 8000 years
> before 1970 which results in us trying to convert a negative year to a
> positive value before testing if it's a leap year which gives us the
> wrong answer. I'll send a revert.
Duh. Don't send anything I just zapped the commit from timers/core
next prev parent reply other threads:[~2026-01-30 21:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 8:09 [PATCH] kunit: time: use is_leap_year() helper Jinjie Ruan
2026-01-26 15:22 ` [tip: timers/core] time/kunit: Use " tip-bot2 for Jinjie Ruan
2026-01-30 15:11 ` [PATCH] kunit: time: use " Mark Brown
2026-01-30 19:39 ` Mark Brown
2026-01-30 21:13 ` Thomas Gleixner [this message]
2026-01-31 13:31 ` Mark Brown
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=87h5s2hkha.ffs@tglx \
--to=tglx@kernel.org \
--cc=broonie@kernel.org \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=sboyd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.