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-next>] [day] [month] [year] [list]
Date:   Sun,  8 Mar 2020 23:53:12 +0800
From:   qiwuchen55@...il.com
To:     mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de
Cc:     linux-kernel@...r.kernel.org, chenqiwu <chenqiwu@...omi.com>
Subject: [PATCH] sched/fair: fix build warning about undefined test_idle_cores()

From: chenqiwu <chenqiwu@...omi.com>

The build with arm64's defconfig:
CONFIG_SCHED_MC=y
# CONFIG_SCHED_SMT is not set

Trigger the following warning due to test_idle_cores()'s definition
missing:
kernel/sched/fair.c:1524:20: warning: ‘test_idle_cores’ declared ‘static’
	but never defined [-Wunused-function]

Move the CONFIG_SCHED_SMT ifdeffery around test_idle_cores()'s declaration
to fix it.

Signed-off-by: chenqiwu <chenqiwu@...omi.com>
---
 kernel/sched/fair.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 84594f8..d11d965 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1520,8 +1520,10 @@ static inline bool is_core_idle(int cpu)
 	return true;
 }
 
+#ifdef CONFIG_SCHED_SMT
 /* Forward declarations of select_idle_sibling helpers */
 static inline bool test_idle_cores(int cpu, bool def);
+#endif
 
 struct task_numa_env {
 	struct task_struct *p;
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ