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>
This commit is contained in:
@@ -376,7 +376,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
|
||||
if (!cpumask_equal(&cpu_callin_map, cpu_online_mask))
|
||||
BUG();
|
||||
|
||||
for (cpu_id = 0 ; cpu_id < num_online_cpus() ; cpu_id++)
|
||||
for_each_online_cpu(cpu_id)
|
||||
show_cpu_info(cpu_id);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user