[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <f0554f590687478b33914a4aff9f0e6a62886d44.1579499907.git.viresh.kumar@linaro.org>
Date: Mon, 20 Jan 2020 11:29:05 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>
Cc: Viresh Kumar <viresh.kumar@...aro.org>, hpa@...or.com,
Thomas Gleixner <tglx@...utronix.de>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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 <sfr@...b.auug.org.au>
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
kernel/sched/fair.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 88a1de82dec5..1ca6c14d21ed 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5217,10 +5217,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
--
2.21.0.rc0.269.g1a574e7a288b
Powered by blists - more mailing lists