diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2015-03-05 10:49:19 +1030 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-03-10 13:54:42 +1030 |
| commit | c8ed00107b60b4a890798677d75e5c2910f393bb (patch) | |
| tree | 48a0440907bbef7d8d1d71d090881ba00192ee65 /arch/um/kernel/smp.c | |
| parent | 2f0f267ea0720ec6adbe9cf7386450425fac8258 (diff) | |
Fix weird uses of num_online_cpus().
This may be OK in archs with contiguous CPU numbers and without
hotplug CPUs, but it sets a terrible example.
And open-coding it like drivers/scsi/hpsa.c is just weird.
BTRFS has a weird comparison with num_online_cpus() too, but since
BTRFS just screwed up my test machines' root partition, I'm not
touching it :)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reported-by: Oleg Drokin <green@linuxhacker.ru>
Diffstat (limited to 'arch/um/kernel/smp.c')
| -rw-r--r-- | arch/um/kernel/smp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c index 74077892b34a..525c3657a6af 100644 --- a/arch/um/kernel/smp.c +++ b/arch/um/kernel/smp.c @@ -45,7 +45,7 @@ void smp_send_stop(void) int i; printk(KERN_INFO "Stopping all CPUs..."); - for (i = 0; i < num_online_cpus(); i++) { + for_each_online_cpu(i) { if (i == current_thread->cpu) continue; os_write_file(cpu_data[i].ipi_pipe[1], "S", 1); |
