projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39cd87c
)
powerpc: Use str_plural() in cpu_init_thread_core_maps()
author
Thorsten Blum
<thorsten.blum@toblux.com>
Sun, 31 Mar 2024 22:22:50 +0000
(
00:22
+0200)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Wed, 3 Apr 2024 03:29:28 +0000
(14:29 +1100)
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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://msgid.link/20240331222249.107467-2-thorsten.blum@toblux.com
arch/powerpc/kernel/setup-common.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/setup-common.c
b/arch/powerpc/kernel/setup-common.c
index 01ed1263e1a9890e66dfa21a1e7e2bacae54768a..4bd2f87616baa93a11e4015e01e9c7e986139eeb 100644
(file)
--- 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);
}