From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: ukleinek@kernel.org
Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH] pwm: core: Use str_plural() in pwm_seq_show()
Date: Tue, 18 Jun 2024 15:52:48 +0800 [thread overview]
Message-ID: <20240618075248.1325-1-jiapeng.chong@linux.alibaba.com> (raw)
Use existing str_plural() function rather than duplicating its
implementation.
./drivers/pwm/core.c:1690:6-16: opportunity for str_plural(chip->npwm).
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9352
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.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 5c1d20985148..141c5003b216 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -1687,7 +1687,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.20.1.7.g153144c
next reply other threads:[~2024-06-18 7:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 7:52 Jiapeng Chong [this message]
2024-07-05 9:30 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240618075248.1325-1-jiapeng.chong@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=abaci@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=ukleinek@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®