-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: stm32_stgen: fix type in debug trace #7242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps rtc_diff_calendar_tick()
should return a uint64_t
to begin with? Anyways this looks good:
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
...or what about using |
core/drivers/counter/stm32_stgen.c
Outdated
@@ -155,7 +155,7 @@ static void stm32_stgen_pm_resume(void) | |||
io_setbits32(stgen_d.base + STGENC_CNTCR, STGENC_CNTCR_EN); | |||
|
|||
DMSG("Time spent in low-power: %"PRIu64"ms", | |||
(nb_pm_count_ticks * 1000) / clock_src_rate); | |||
(uint64_t)(nb_pm_count_ticks * 1000) / clock_src_rate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nb_pm_count_ticks
is of type signed long long
so the DMSG()
format specifier should be lld
instead of "PRIu64"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I didn't see Jérôme's comment :-)
Ok, fair, comment addressed (tag not applied) |
|
Fix the type in a debug trace in stm32_stgen_pm_resume() to fix a compilation warning. Fixes: b0b019b ("drivers: counter: stm32_stgen: add STGEN driver") Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Tag applied, thanks |
Cast the result of an operation in stm32_stgen_pm_resume() to fix a compilation warning.