From: Ammar Faizi Date: Sun, 26 Feb 2023 16:53:20 +0000 (+0700) Subject: workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu() X-Git-Tag: v6.6.17~4973^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8ec5880bd82b834717770cba4596381ffd50545;p=platform%2Fkernel%2Flinux-rpi.git workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu() Use pr_warn_once() to achieve the same thing. It's simpler. Signed-off-by: Ammar Faizi Reviewed-by: Lai Jiangshan Signed-off-by: Tejun Heo --- diff --git a/kernel/workqueue.c b/kernel/workqueue.c index b8b541c..3f1fabe 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1392,15 +1392,13 @@ static bool is_chained_work(struct workqueue_struct *wq) */ static int wq_select_unbound_cpu(int cpu) { - static bool printed_dbg_warning; int new_cpu; if (likely(!wq_debug_force_rr_cpu)) { if (cpumask_test_cpu(cpu, wq_unbound_cpumask)) return cpu; - } else if (!printed_dbg_warning) { - pr_warn("workqueue: round-robin CPU selection forced, expect performance impact\n"); - printed_dbg_warning = true; + } else { + pr_warn_once("workqueue: round-robin CPU selection forced, expect performance impact\n"); } if (cpumask_empty(wq_unbound_cpumask))