lkml.org 
[lkml]   [2020]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched/fair: fix build warning about undefined test_idle_cores()
Date
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
\
 
 \ /
  Last update: 2020-03-08 16:54    [W:0.057 / U:10.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site