Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pwm: Simplify printf to emit chip->npwm in $debugfs/pwm

Instead of caring to correctly pluralize "PWM device(s)" using

(chip->npwm != 1) ? "s" : ""

or

str_plural(chip->npwm)

just simplify the format to not need a plural-s.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20250926165702.321514-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>

authored by

Uwe Kleine-König and committed by
Uwe Kleine-König
3cf8e558 f84fd5be

+2 -3
+2 -3
drivers/pwm/core.c
··· 2696 2696 { 2697 2697 struct pwm_chip *chip = v; 2698 2698 2699 - seq_printf(s, "%s%d: %s/%s, %d PWM device%s\n", 2699 + seq_printf(s, "%s%d: %s/%s, npwm: %d\n", 2700 2700 (char *)s->private, chip->id, 2701 2701 pwmchip_parent(chip)->bus ? pwmchip_parent(chip)->bus->name : "no-bus", 2702 - dev_name(pwmchip_parent(chip)), chip->npwm, 2703 - (chip->npwm != 1) ? "s" : ""); 2702 + dev_name(pwmchip_parent(chip)), chip->npwm); 2704 2703 2705 2704 pwm_dbg_show(chip, s); 2706 2705