aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorValentin Caron <[email protected]>2023-07-05 19:43:56 +0200
committerAlexandre Belloni <[email protected]>2023-07-27 23:03:34 +0200
commit46828a5f89044b8e057f6bbb50ae2bac926a0fa2 (patch)
treecb4c6df28593e63df98fb226fa3da34df28f2673 /scripts/gcc-plugins/randomize_layout_plugin.c
parentfb9a7e5360dc8089097337a9685f6fed350a310f (diff)
rtc: stm32: fix issues of stm32_rtc_valid_alrm function
stm32_rtc_valid_alrm function has some issues : - arithmetical operations are impossible on BCD values - "cur_mon + 1" can overflow - the use case with the next month, the same day/hour/minutes went wrong To solve that, we prefer to use timestamp comparison. e.g. : On 5 Dec. 2021, the alarm limit is 5 Jan. 2022 (+31 days) On 31 Jan 2021, the alarm limit is 28 Feb. 2022 (+28 days) Signed-off-by: Valentin Caron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions