]> Gentwo Git Trees - linux/.git/commitdiff
pwm: Use %u to printf unsigned int pwm_chip::npwm and pwm_chip::id
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Mon, 6 Oct 2025 13:35:26 +0000 (15:35 +0200)
committerUwe Kleine-König <ukleinek@kernel.org>
Fri, 14 Nov 2025 10:56:14 +0000 (11:56 +0100)
%u is the right conversion specifier to emit an unsigned int value.

Fixes: 62099abf67a2 ("pwm: Add debugfs interface")
Fixes: 0360a4873372 ("pwm: Mention PWM chip ID in /sys/kernel/debug/pwm")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20251006133525.2457171-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/core.c

index 5b75f4a0849670e9176ab2ad5cb74e4bcf6e3f67..7dd1cf2ba40252947d6d66812f21a6d8cecbf484 100644 (file)
@@ -2696,7 +2696,7 @@ static int pwm_seq_show(struct seq_file *s, void *v)
 {
        struct pwm_chip *chip = v;
 
-       seq_printf(s, "%s%d: %s/%s, npwm: %d\n",
+       seq_printf(s, "%s%u: %s/%s, npwm: %u\n",
                   (char *)s->private, chip->id,
                   pwmchip_parent(chip)->bus ? pwmchip_parent(chip)->bus->name : "no-bus",
                   dev_name(pwmchip_parent(chip)), chip->npwm);