]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
cpumask: use for_each_online_cpu() in drivers/infiniband/hw/ehca/ehca_irq.c
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Dec 2008 22:35:17 +0000 (09:05 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Dec 2008 22:35:17 +0000 (09:05 +1030)
Impact: cleanup

In future, accessing cpu numbers beyond nr_cpu_ids (the runtime limit)
will be undefined.  We can avoid future problems by using
for_each_online_cpu() here.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Tested-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Cc: Christoph Raisch <raisch@de.ibm.com>
drivers/infiniband/hw/ehca/ehca_irq.c

index 757035ea246faff58225747668d38a53f5362e59..6305209fdea81df10f4a63ded5b448244456e46f 100644 (file)
@@ -934,10 +934,9 @@ void ehca_destroy_comp_pool(void)
 
        unregister_hotcpu_notifier(&comp_pool_callback_nb);
 
-       for (i = 0; i < NR_CPUS; i++) {
-               if (cpu_online(i))
-                       destroy_comp_task(pool, i);
-       }
+       for_each_online_cpu(i)
+               destroy_comp_task(pool, i);
+
        free_percpu(pool->cpu_comp_tasks);
        kfree(pool);
 }