From: tip-bot for Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
fabio.estevam@freescale.com, a.p.zijlstra@chello.nl,
tglx@linutronix.de
Subject: [tip:numa/core] sysctl/sched: Fix 'defined but not used' warning
Date: Wed, 24 Oct 2012 02:42:46 -0700 [thread overview]
Message-ID: <tip-p9w5w57ylinrj9zakvhc5zay@git.kernel.org> (raw)
Commit-ID: f7d07c71748f040a1dc85943245931925b80892f
Gitweb: http://git.kernel.org/tip/f7d07c71748f040a1dc85943245931925b80892f
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
AuthorDate: Tue, 23 Oct 2012 17:47:12 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 24 Oct 2012 10:19:07 +0200
sysctl/sched: Fix 'defined but not used' warning
Since commit ("sched/numa: Implement NUMA home-node selection code")
building a kernel with CONFIG_SMP disabled causes the following
warning:
kernel/sysctl.c:259:12: warning: 'min_sched_tunable_scaling' defined but not used [-Wunused-variable]
kernel/sysctl.c:260:12: warning: 'max_sched_tunable_scaling' defined but not used [-Wunused-variable]
Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
[ Ingo preferred extra #ifdef variant over the __maybe_unused ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-p9w5w57ylinrj9zakvhc5zay@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sysctl.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 2f7e671..b769d25 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -256,9 +256,11 @@ static int min_sched_granularity_ns = 100000; /* 100 usecs */
static int max_sched_granularity_ns = NSEC_PER_SEC; /* 1 second */
static int min_wakeup_granularity_ns; /* 0 usecs */
static int max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
+#ifdef CONFIG_SMP
static int min_sched_tunable_scaling = SCHED_TUNABLESCALING_NONE;
static int max_sched_tunable_scaling = SCHED_TUNABLESCALING_END-1;
-#endif
+#endif /* CONFIG_SMP */
+#endif /* CONFIG_SCHED_DEBUG */
#ifdef CONFIG_COMPACTION
static int min_extfrag_threshold;
reply other threads:[~2012-10-24 9:44 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=tip-p9w5w57ylinrj9zakvhc5zay@git.kernel.org \
--to=a.p.zijlstra@chello.nl \
--cc=fabio.estevam@freescale.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®