diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-01-18 18:30:55 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-01-18 18:30:55 -0800 |
| commit | 012061cc70e9c7e0d794a3e609fd79fdf9f5267d (patch) | |
| tree | a1a1cee6d1e7b4576a7ee148e297c04936388402 /kernel/workqueue.c | |
| parent | 90c7f71962cc5aa0bf128ce68b9a8607176558c4 (diff) | |
[PATCH] Use for_each_cpu() Where It's Meant To Be
From: Rusty Russell <rusty@rustcorp.com.au>
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).
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; |
