From: Thorsten Blum <thorsten.blum@toblux.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
Cc: Rob Herring <robh@kernel.org>, Baoquan He <bhe@redhat.com>,
linux-kernel@vger.kernel.org,
Thorsten Blum <thorsten.blum@toblux.com>,
linuxppc-dev@lists.ozlabs.org,
Hari Bathini <hbathini@linux.ibm.com>
Subject: [PATCH] powerpc: Use str_plural() to fix Coccinelle warning
Date: Mon, 1 Apr 2024 00:22:50 +0200 [thread overview]
Message-ID: <20240331222249.107467-2-thorsten.blum@toblux.com> (raw)
Fixes the following Coccinelle/coccicheck warning reported by
string_choices.cocci:
opportunity for str_plural(tpc)
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
arch/powerpc/kernel/setup-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 01ed1263e1a9..4bd2f87616ba 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -405,7 +405,7 @@ static void __init cpu_init_thread_core_maps(int tpc)
cpumask_set_cpu(i, &threads_core_mask);
printk(KERN_INFO "CPU maps initialized for %d thread%s per core\n",
- tpc, tpc > 1 ? "s" : "");
+ tpc, str_plural(tpc));
printk(KERN_DEBUG " (thread shift is %d)\n", threads_shift);
}
--
2.44.0
next reply other threads:[~2024-04-01 4:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-31 22:22 Thorsten Blum [this message]
2024-04-22 8:16 ` [PATCH] powerpc: Use str_plural() to fix Coccinelle warning Michael Ellerman
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=20240331222249.107467-2-thorsten.blum@toblux.com \
--to=thorsten.blum@toblux.com \
--cc=aneesh.kumar@kernel.org \
--cc=bhe@redhat.com \
--cc=christophe.leroy@csgroup.eu \
--cc=hbathini@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).