mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fabio Estevam <fabio.estevam@freescale.com>
To: <akpm@linux-foundation.org>
Cc: <mingo@kernel.org>, <arnd@arndb.de>,
	<linux-kernel@vger.kernel.org>, <a.p.zijlstra@chello.nl>,
	<festevam@gmail.com>, Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH] sysctl: Fix 'defined but not used' warning
Date: Fri, 5 Oct 2012 12:57:48 -0300	[thread overview]
Message-ID: <1349452668-8601-1-git-send-email-fabio.estevam@freescale.com> (raw)

Since commit 4ae834f767(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]

Annotate theses variables as '__maybe_unused'.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 kernel/sysctl.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index af25d0c..4bf02e4 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -256,8 +256,8 @@ 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 */
-static int min_sched_tunable_scaling = SCHED_TUNABLESCALING_NONE;
-static int max_sched_tunable_scaling = SCHED_TUNABLESCALING_END-1;
+static int __maybe_unused min_sched_tunable_scaling = SCHED_TUNABLESCALING_NONE;
+static int __maybe_unused max_sched_tunable_scaling = SCHED_TUNABLESCALING_END-1;
 #endif
 
 #ifdef CONFIG_COMPACTION
-- 
1.7.9.5



             reply	other threads:[~2012-10-05 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 15:57 Fabio Estevam [this message]
2012-10-05 18:03 ` Arnd Bergmann

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=1349452668-8601-1-git-send-email-fabio.estevam@freescale.com \
    --to=fabio.estevam@freescale.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=festevam@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@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

all inboxes | Powered by JetHome®