Skip to content

Commit 3cf8e55

Browse files
ukleinekUwe Kleine-König
authored andcommitted
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>
1 parent f84fd5b commit 3cf8e55

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/pwm/core.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,11 +2696,10 @@ static int pwm_seq_show(struct seq_file *s, void *v)
26962696
{
26972697
struct pwm_chip *chip = v;
26982698

2699-
seq_printf(s, "%s%d: %s/%s, %d PWM device%s\n",
2699+
seq_printf(s, "%s%d: %s/%s, npwm: %d\n",
27002700
(char *)s->private, chip->id,
27012701
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);
27042703

27052704
pwm_dbg_show(chip, s);
27062705

0 commit comments

Comments
 (0)