diff options
author | Viresh Kumar <[email protected]> | 2020-01-20 11:29:05 +0530 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2020-01-20 08:03:39 +0100 |
commit | afa70d941f663c69c9a64ec1021bbcfa82f0e54a (patch) | |
tree | d1b31b36ae61f7143fb85c0a377bd33d474eb2ef | |
parent | ccf74128d66ce937876184ad55db2e0276af08d3 (diff) |
sched/fair: Define sched_idle_cpu() only for SMP configurations
sched_idle_cpu() isn't used for non SMP configuration and with a recent
change, we have started getting following warning:
kernel/sched/fair.c:5221:12: warning: ‘sched_idle_cpu’ defined but not used [-Wunused-function]
Fix that by defining sched_idle_cpu() only for SMP configurations.
Fixes: 323af6deaf70 ("sched/fair: Load balance aggressively for SCHED_IDLE CPUs")
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Juri Lelli <[email protected]>
Cc: Vincent Guittot <[email protected]>
Cc: Dietmar Eggemann <[email protected]>
Link: https://lore.kernel.org/r/f0554f590687478b33914a4aff9f0e6a62886d44.1579499907.git.viresh.kumar@linaro.org
-rw-r--r-- | kernel/sched/fair.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ebf50955fe8a..fe4e0d775375 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5218,10 +5218,12 @@ static int sched_idle_rq(struct rq *rq) rq->nr_running); } +#ifdef CONFIG_SMP static int sched_idle_cpu(int cpu) { return sched_idle_rq(cpu_rq(cpu)); } +#endif /* * The enqueue_task method is called before nr_running is |