From 012061cc70e9c7e0d794a3e609fd79fdf9f5267d Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 18 Jan 2004 18:30:55 -0800 Subject: [PATCH] Use for_each_cpu() Where It's Meant To Be From: Rusty Russell Some places use cpu_online() where they should be using cpu_possible, most commonly for tallying statistics. This makes no difference without hotplug CPU. Use the for_each_cpu() macro in those places, providing good examples (and making the external hotplug CPU patch smaller). Some places use cpu_online() where they should be using cpu_possible, most commonly for tallying statistics. This makes no difference without hotplug CPU. Use the for_each_cpu() macro in those places, providing good examples (and making the external hotplug CPU patch smaller). --- kernel/workqueue.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'kernel/workqueue.c') diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 7b77fb75dc07..4b109a7d390b 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -366,9 +366,7 @@ int current_is_keventd(void) BUG_ON(!keventd_wq); - for (cpu = 0; cpu < NR_CPUS; cpu++) { - if (!cpu_online(cpu)) - continue; + for_each_cpu(cpu) { cwq = keventd_wq->cpu_wq + cpu; if (current == cwq->thread) return 1; -- cgit v1.2.3