diff options
| author | Mark Brown <broonie@kernel.org> | 2026-01-30 19:48:35 +0000 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-02-02 12:37:54 +0100 |
| commit | 24989330fb99189cf9ec4accef6ac81c7b1c31f7 (patch) | |
| tree | 36eab174865358bc92722ea6deeea0216dd7e10f /include/linux | |
| parent | 56534673cea7f00d96a64deb58057298fe9f192e (diff) | |
time/kunit: Document handling of negative years of is_leap()
The code local is_leap() helper was tried to be replaced by the RTC
is_leap_year() function. Unfortunately the two aren't exactly equivalent,
as the kunit variant uses a signed value for the year and the RTC an
unsigned one.
Since the KUnit tests cover a 16000 year range around the epoch they use
year values that are very comfortably negative and hence get mishandled
when passed into is_leap_year().
The change was reverted, so add a comment which prevents further attempts
to do so.
[ tglx: Adapted to the revert ]
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260130-kunit-fix-leap-year-v1-1-92ddf55dffd7@kernel.org
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
