From 7da84f254edc563022a0f71a14f9dc08234bfc8e Mon Sep 17 00:00:00 2001 From: Marco Casaroli Date: Sat, 1 Aug 2026 20:30:50 +0200 Subject: [PATCH] arch/arm/rp23xx: Use the right formats in the PWM period message. setup_period() printed the uint8_t slice number with %d, and the uint32_t frequency, the uint16_t top and the uint32_t divisor with %lu. Use %u for the two small fields and PRIu32 for the two uint32_t fields. No build warns about this today, because GCC does not check syslog format strings. It shows with CONFIG_DEBUG_PWM_INFO only. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli --- arch/arm/src/rp23xx/rp23xx_pwm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/rp23xx/rp23xx_pwm.c b/arch/arm/src/rp23xx/rp23xx_pwm.c index 943a98958ac..d74a2ba8330 100644 --- a/arch/arm/src/rp23xx/rp23xx_pwm.c +++ b/arch/arm/src/rp23xx/rp23xx_pwm.c @@ -26,6 +26,8 @@ #include +#include + #include #include #include @@ -527,7 +529,7 @@ void setup_period(struct rp23xx_pwm_lowerhalf_s *priv) priv->top = top; priv->divisor = div16; - pwminfo("PWM%d freq=%lu top=%lu div=%lu\n", + pwminfo("PWM%u freq=%" PRIu32 " top=%u div=%" PRIu32 "\n", priv->num, priv->frequency, priv->top,