Commit 60a06efc authored by Abhishek Tamboli's avatar Abhishek Tamboli Committed by Alexandre Belloni
Browse files

rtc: m48t59: Remove division condition with direct comparison



Replace 'year / 100' with a direct comparison 'year >= 100'
in m48t59_rtc_set_time() function. Improve the code clarity
and eliminate division overhead.

Fix the following smatch warning:
drivers/rtc/rtc-m48t59.c:135 m48t59_rtc_set_time() warn:
replace divide condition 'year / 100' with 'year >= 100'

Signed-off-by: default avatarAbhishek Tamboli <abhishektamboli9@gmail.com>
Link: https://lore.kernel.org/r/20240809155631.548044-1-abhishektamboli9@gmail.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 73580e2e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment