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>] [day] [month] [year] [list]
Message-ID: <tip-6e29ec5701e9d44fa02b96c1c5c45f7516182b65@git.kernel.org>
Date:	Tue, 21 Apr 2009 08:06:37 GMT
From:	tip-bot for Gautham R Shenoy <ego@...ibm.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, ego@...ibm.com, hpa@...or.com,
	mingo@...hat.com, rusty@...tcorp.com.au, sfr@...b.auug.org.au,
	tglx@...utronix.de, mingo@...e.hu
Subject: [tip:sched/core] sched: Replace first_cpu() with cpumask_first() in ILB nomination code

Commit-ID:  6e29ec5701e9d44fa02b96c1c5c45f7516182b65
Gitweb:     http://git.kernel.org/tip/6e29ec5701e9d44fa02b96c1c5c45f7516182b65
Author:     Gautham R Shenoy <ego@...ibm.com>
AuthorDate: Tue, 21 Apr 2009 08:40:49 +0530
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 21 Apr 2009 08:06:05 +0200

sched: Replace first_cpu() with cpumask_first() in ILB nomination code

Stephen Rothwell reported this build warning:

>  kernel/sched.c: In function 'find_new_ilb':
>  kernel/sched.c:4355: warning: passing argument 1 of '__first_cpu' from incompatible pointer type
>
> Possibly caused by commit f711f6090a81cbd396b63de90f415d33f563af9b
> ("sched: Nominate idle load balancer from a semi-idle package") from
> the sched tree.  Should this call to first_cpu be cpumask_first?

For !(CONFIG_SCHED_MC || CONFIG_SCHED_SMT), find_new_ilb() nominates the
Idle load balancer as the first cpu from the nohz.cpu_mask.

This code uses the older API first_cpu(). Replace it with cpumask_first(),
which is the correct API here.

[ Impact: cleanup, address build warning ]

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Gautham R Shenoy <ego@...ibm.com>
Cc: Rusty Russell <rusty@...tcorp.com.au>
LKML-Reference: <20090421031049.GA4140@...ibm.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>


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

diff --git a/kernel/sched.c b/kernel/sched.c
index 797f6fd..54d67b9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4356,7 +4356,7 @@ out_done:
 #else /*  (CONFIG_SCHED_MC || CONFIG_SCHED_SMT) */
 static inline int find_new_ilb(int call_cpu)
 {
-	return first_cpu(nohz.cpu_mask);
+	return cpumask_first(nohz.cpu_mask);
 }
 #endif
 
--
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