mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: use for_each_class macro in move_one_task()
@ 2009-08-18  4:01 Hiroshi Shimamoto
  2009-08-20 11:03 ` [tip:sched/core] sched: Use " tip-bot for Hiroshi Shimamoto
  0 siblings, 1 reply; 2+ messages in thread
From: Hiroshi Shimamoto @ 2009-08-18  4:01 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel

From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>

Replace for loop with the macro for_each_class to cleanup.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
 kernel/sched.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 5184580..d559fa7 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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;
 }
-- 
1.6.3.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:sched/core] sched: Use for_each_class macro in move_one_task()
  2009-08-18  4:01 [PATCH] sched: use for_each_class macro in move_one_task() Hiroshi Shimamoto
@ 2009-08-20 11:03 ` tip-bot for Hiroshi Shimamoto
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Hiroshi Shimamoto @ 2009-08-20 11:03 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, h-shimamoto, hpa, mingo, tglx, mingo

Commit-ID:  cde7e5ca4e329a157108769d1f752d191cbb71c6
Gitweb:     http://git.kernel.org/tip/cde7e5ca4e329a157108769d1f752d191cbb71c6
Author:     Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
AuthorDate: Tue, 18 Aug 2009 13:01:01 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 20 Aug 2009 13:00:30 +0200

sched: Use for_each_class macro in move_one_task()

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>


---
 kernel/sched.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 7f83be3..1b529ef 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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;
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-20 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-18  4:01 [PATCH] sched: use for_each_class macro in move_one_task() Hiroshi Shimamoto
2009-08-20 11:03 ` [tip:sched/core] sched: Use " tip-bot for Hiroshi Shimamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome