]> Git Repo - linux.git/commitdiff
sched: Fix incorrect usage of for_each_cpu_mask() in select_fallback_rq()
authorSrivatsa S. Bhat <[email protected]>
Fri, 30 Mar 2012 14:10:28 +0000 (19:40 +0530)
committerIngo Molnar <[email protected]>
Sat, 31 Mar 2012 08:43:36 +0000 (10:43 +0200)
The function for_each_cpu_mask() expects a *pointer* to struct
cpumask as its second argument, whereas select_fallback_rq()
passes the value itself.

And moreover, for_each_cpu_mask() has been marked as obselete
in include/linux/cpumask.h. So move to the more appropriate
for_each_cpu() variant.

Reported-by: Sasha Levin <[email protected]>
Signed-off-by: Srivatsa S. Bhat <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Dave Jones <[email protected]>
Cc: Liu Chuansheng <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/sched/core.c

index 985f6e59515471b198ad2fcb7fc468efc5a81b40..8773176b8c779bf6281bafbf9e81725311d2043f 100644 (file)
@@ -1268,7 +1268,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
        int dest_cpu;
 
        /* Look for allowed, online CPU in same node. */
-       for_each_cpu_mask(dest_cpu, *nodemask) {
+       for_each_cpu(dest_cpu, nodemask) {
                if (!cpu_online(dest_cpu))
                        continue;
                if (!cpu_active(dest_cpu))
@@ -1279,7 +1279,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
 
        for (;;) {
                /* Any allowed, online CPU? */
-               for_each_cpu_mask(dest_cpu, *tsk_cpus_allowed(p)) {
+               for_each_cpu(dest_cpu, tsk_cpus_allowed(p)) {
                        if (!cpu_online(dest_cpu))
                                continue;
                        if (!cpu_active(dest_cpu))
This page took 0.083537 seconds and 4 git commands to generate.