summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2015-01-13 16:56:38 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-14 21:50:06 +0000
commit34f927724f22d79c8e4c752189dc19b7fd4f7735 (patch)
tree4cda43292e1935abf7e9b3e0a30345d9136b7f7d
parente2355ff432dcef946b2f0b260e0de763c31288de (diff)
downloadchrome-ec-34f927724f22d79c8e4c752189dc19b7fd4f7735.tar.gz
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>
-rw-r--r--chip/stm32/clock-stm32f0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/stm32/clock-stm32f0.c b/chip/stm32/clock-stm32f0.c
index 30a0efdf2b..74534eee3a 100644
--- a/chip/stm32/clock-stm32f0.c
+++ b/chip/stm32/clock-stm32f0.c
@@ -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 */