casaroli opened a new pull request, #20485: URL: https://github.com/apache/nuttx/pull/20485
## Summary `setup_period()` in `rp23xx_pwm.c` printed the `uint8_t` slice number with `%d`, and the `uint32_t` frequency, the `uint16_t` top and the `uint32_t` divisor with `%lu`. This PR uses `%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. The message prints only with `CONFIG_DEBUG_PWM_INFO`. The first commit fixes the older nxstyle errors in the same file (the indentation of three `else` blocks and of the switch in `rp23xx_pwm_ioctl()`), because CI checks the whole file. It is whitespace only: `git diff -w` is empty. ## Impact Debug output only. No change to the generated code outside `CONFIG_DEBUG_PWM_INFO`. ## Testing Arm GNU Toolchain 13.2.rel1 (the CI version). `raspberrypi-pico-2:nsh` with PWM0 and `CONFIG_DEBUG_PWM_INFO` builds with no new warnings. `tools/checkpatch.sh -c -u -m -g` passes. On a Pimoroni Pico Plus 2 W, `pimoroni-pico-plus-2-w:nsh` with PWM4 on GPIO 8, `CONFIG_DEBUG_PWM_INFO` and the `pwm` example, before and after this PR: ``` nsh> pwm -p /dev/pwm4 -f 1000 -d 25 -t 1 setup_period: PWM4 freq=1000 top=65535 div=36 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
