Commit cde7e5ca authored by Hiroshi Shimamoto's avatar Hiroshi Shimamoto Committed by Ingo Molnar

sched: Use for_each_class macro in move_one_task()

Replace for loop with the macro for_each_class to cleanup.
Signed-off-by: default avatarHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
LKML-Reference: <4A8A277D.4090304@ct.jp.nec.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 1314562a
...@@ -3461,9 +3461,10 @@ static int move_one_task(struct rq *this_rq, int this_cpu, struct rq *busiest, ...@@ -3461,9 +3461,10 @@ static int move_one_task(struct rq *this_rq, int this_cpu, struct rq *busiest,
{ {
const struct sched_class *class; const struct sched_class *class;
for (class = sched_class_highest; class; class = class->next) for_each_class(class) {
if (class->move_one_task(this_rq, this_cpu, busiest, sd, idle)) if (class->move_one_task(this_rq, this_cpu, busiest, sd, idle))
return 1; return 1;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment