mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
stm32: remove useless modulo
The RTC delay is always less than a day (see the assert at the beginning of set_rtc_alarm), so remove the useless module to save a few bytes of flash. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=samus BUG=none TEST=make buildall and see the zinger firmware is smaller by 16 bytes (more than the 8 bytes I need to submit the following CL) Change-Id: If0374ff5897f13e69574018d2123428075b2264e Reviewed-on: https://chromium-review.googlesource.com/240564 Reviewed-by: Alec Berg <alecaberg@chromium.org> Trybot-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
e2355ff432
commit
34f927724f
@@ -156,7 +156,7 @@ void set_rtc_alarm(uint32_t delay_s, uint32_t delay_us,
|
||||
/* Calculate alarm time */
|
||||
alarm_sec = rtc_to_sec(*rtc) + delay_s;
|
||||
alarm_us = (RTC_PREDIV_S - *rtcss) * US_PER_RTC_TICK + delay_us;
|
||||
alarm_sec = (alarm_sec + alarm_us / SECOND) % 86400;
|
||||
alarm_sec = alarm_sec + alarm_us / SECOND;
|
||||
alarm_us = alarm_us % 1000000;
|
||||
|
||||
/* Set alarm time */
|
||||
|
||||
Reference in New Issue
Block a user