diff options
author | Thorsten Blum <[email protected]> | 2024-05-08 17:42:26 +0200 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2024-06-17 15:17:44 +0200 |
commit | c4df15931cb72556fea93bd763ada88e56cbd8e5 (patch) | |
tree | c37fdc34532571410f213ffaecc84e3e3d7b7e26 | |
parent | f45a6051d582f613f4abc383ae238661f7813302 (diff) |
smp: Use str_plural() to fix Coccinelle warnings
Fixes the following two Coccinelle/coccicheck warnings reported by
string_choices.cocci:
opportunity for str_plural(num_cpus)
opportunity for str_plural(num_nodes)
Signed-off-by: Thorsten Blum <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Paul E. McKenney <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | kernel/smp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index f085ebcdf9e7..18483570cc5f 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -25,6 +25,7 @@ #include <linux/nmi.h> #include <linux/sched/debug.h> #include <linux/jump_label.h> +#include <linux/string_choices.h> #include <trace/events/ipi.h> #define CREATE_TRACE_POINTS @@ -982,8 +983,7 @@ void __init smp_init(void) num_nodes = num_online_nodes(); num_cpus = num_online_cpus(); pr_info("Brought up %d node%s, %d CPU%s\n", - num_nodes, (num_nodes > 1 ? "s" : ""), - num_cpus, (num_cpus > 1 ? "s" : "")); + num_nodes, str_plural(num_nodes), num_cpus, str_plural(num_cpus)); /* Any cleanup work */ smp_cpus_done(setup_max_cpus); |