* [PATCH] sched/fair: fix build warning about undefined test_idle_cores()
@ 2020-03-08 15:53 qiwuchen55
2020-03-08 18:34 ` Mel Gorman
0 siblings, 1 reply; 2+ messages in thread
From: qiwuchen55 @ 2020-03-08 15:53 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
rostedt, bsegall, mgorman
Cc: linux-kernel, chenqiwu
From: chenqiwu <chenqiwu@xiaomi.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@xiaomi.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sched/fair: fix build warning about undefined test_idle_cores()
2020-03-08 15:53 [PATCH] sched/fair: fix build warning about undefined test_idle_cores() qiwuchen55
@ 2020-03-08 18:34 ` Mel Gorman
0 siblings, 0 replies; 2+ messages in thread
From: Mel Gorman @ 2020-03-08 18:34 UTC (permalink / raw)
To: qiwuchen55
Cc: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
rostedt, bsegall, linux-kernel, chenqiwu
On Sun, Mar 08, 2020 at 11:53:12PM +0800, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.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@xiaomi.com>
Thanks. A fix has been merged to tip/sched/core as
commit 76c389ab2b5e300698eab87f9d4b7916f14117ba
Author: Valentin Schneider <valentin.schneider@arm.com>
Date: Tue Mar 3 11:02:57 2020 +0000
sched/fair: Fix kernel build warning in test_idle_cores() for !SMT NUMA
--
Mel Gorman
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-08 18:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-08 15:53 [PATCH] sched/fair: fix build warning about undefined test_idle_cores() qiwuchen55
2020-03-08 18:34 ` Mel Gorman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox