Skip to content

Commit

Permalink
sched: Use for_each_class macro in move_one_task()
Browse files Browse the repository at this point in the history
Replace for loop with the macro for_each_class to cleanup.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
LKML-Reference: <4A8A277D.4090304@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Hiroshi Shimamoto authored and Ingo Molnar committed Aug 20, 2009
1 parent 1314562 commit cde7e5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3461,9 +3461,10 @@ static int move_one_task(struct rq *this_rq, int this_cpu, struct rq *busiest,
{
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))
return 1;
}

return 0;
}
Expand Down

0 comments on commit cde7e5c

Please sign in to comment.