lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-cde7e5ca4e329a157108769d1f752d191cbb71c6@git.kernel.org>
Date:	Thu, 20 Aug 2009 11:03:38 GMT
From:	tip-bot for Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, h-shimamoto@...jp.nec.com,
	hpa@...or.com, mingo@...hat.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:sched/core] sched: Use for_each_class macro in move_one_task()

Commit-ID:  cde7e5ca4e329a157108769d1f752d191cbb71c6
Gitweb:     http://git.kernel.org/tip/cde7e5ca4e329a157108769d1f752d191cbb71c6
Author:     Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
AuthorDate: Tue, 18 Aug 2009 13:01:01 +0900
Committer:  Ingo Molnar <mingo@...e.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@...jp.nec.com>
LKML-Reference: <4A8A277D.4090304@...jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@...e.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;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ