Skip to content
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

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

GseoC
Copy link
Contributor

@GseoC GseoC commented Jan 24, 2025

Cast the result of an operation in stm32_stgen_pm_resume() to fix a compilation warning.

Copy link
Contributor

@jforissier jforissier left a 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>

@jforissier
Copy link
Contributor

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 %lld since the argument is a signed long long int?

@@ -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);
Copy link
Contributor

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".

Copy link
Contributor

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 :-)

@GseoC
Copy link
Contributor Author

GseoC commented Jan 27, 2025

Ok, fair, comment addressed (tag not applied)

@etienne-lms
Copy link
Contributor

Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>

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>
@GseoC
Copy link
Contributor Author

GseoC commented Jan 27, 2025

Tag applied, thanks

@jforissier jforissier merged commit 4a633b5 into OP-TEE:master Jan 27, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants