[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250818083629.503250-1-zhao.xichao@vivo.com>
Date: Mon, 18 Aug 2025 16:36:29 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: ukleinek@...nel.org
Cc: linux-pwm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH] pwm: use str_plural() to simplify the code
Use the string choice helper function str_plural() to simplify the code.
Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
---
drivers/pwm/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 0d66376a83ec..732d22dee035 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -2620,7 +2620,7 @@ static int pwm_seq_show(struct seq_file *s, void *v)
(char *)s->private, chip->id,
pwmchip_parent(chip)->bus ? pwmchip_parent(chip)->bus->name : "no-bus",
dev_name(pwmchip_parent(chip)), chip->npwm,
- (chip->npwm != 1) ? "s" : "");
+ str_plural(chip->npwm));
pwm_dbg_show(chip, s);
--
2.34.1
Powered by blists - more mailing lists