linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Viresh Kumar" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Ingo Molnar <mingo@kernel.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>, x86 <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [tip: sched/core] sched/fair: Define sched_idle_cpu() only for SMP configurations
Date: Mon, 20 Jan 2020 07:08:19 -0000	[thread overview]
Message-ID: <157950409950.396.10173546303615983871.tip-bot2@tip-bot2> (raw)
In-Reply-To: =?utf-8?q?=3Cf0554f590687478b33914a4aff9f0e6a62886d44=2E15794?= =?utf-8?q?99907=2Egit=2Eviresh=2Ekumar=40linaro=2Eorg=3E?=

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     afa70d941f663c69c9a64ec1021bbcfa82f0e54a
Gitweb:        https://git.kernel.org/tip/afa70d941f663c69c9a64ec1021bbcfa82f0e54a
Author:        Viresh Kumar <viresh.kumar@linaro.org>
AuthorDate:    Mon, 20 Jan 2020 11:29:05 +05:30
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 20 Jan 2020 08:03:39 +01:00

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@canb.auug.org.au>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lore.kernel.org/r/f0554f590687478b33914a4aff9f0e6a62886d44.1579499907.git.viresh.kumar@linaro.org
---
 kernel/sched/fair.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ebf5095..fe4e0d7 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

                 reply	other threads:[~2020-01-20  7:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=157950409950.396.10173546303615983871.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).