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:
Vincent Palatin
2015-01-13 16:56:38 -08:00
committed by ChromeOS Commit Bot
parent e2355ff432
commit 34f927724f

View File

@@ -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 */