aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_xarray.c
diff options
context:
space:
mode:
authorCsókás, Bence <[email protected]>2024-06-11 07:24:09 +0000
committerAlexandre Belloni <[email protected]>2024-07-06 22:39:27 +0000
commit68f78c720da4088d254250867126c6ae5b68fa2a (patch)
tree5425be29a73dd50445d0e490cd39cad7c01f10f8 /lib/test_xarray.c
parentrtc: ds1307: Detect oscillator fail on mcp794xx (diff)
downloadkernel-68f78c720da4088d254250867126c6ae5b68fa2a.tar.gz
kernel-68f78c720da4088d254250867126c6ae5b68fa2a.zip
rtc: ds1307: Clamp year to valid BCD (0-99) in `set_time()`
`tm_year` may go up to 299 if the device supports the century bit. Therefore, subtracting may not give us a valid 2-digit number, but modulo does. Co-developed-by: Szentendrei, Tamás <[email protected]> Signed-off-by: Szentendrei, Tamás <[email protected]> Signed-off-by: Csókás, Bence <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'lib/test_xarray.c')
0 files changed, 0 insertions, 0 deletions