* [PATCH] fix unused variable without softlock detection and highmem
@ 2009-02-23 12:09 Nikanth Karthikesan
2009-02-23 14:59 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Nikanth Karthikesan @ 2009-02-23 12:09 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Peter Zijlstra, Ingo Molnar, linux-kernel
When both CONFIG_DETECT_SOFTLOCKUP and CONFIG_HIGHMEM are not defined
avoid defining the constant for one fixing the 'define but not used' warning.
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
---
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c5ef44f..f172d9f 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -95,12 +95,15 @@ static int sixty = 60;
static int neg_one = -1;
#endif
+#if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM)
+static int one = 1;
+#endif
+
#if defined(CONFIG_MMU) && defined(CONFIG_FILE_LOCKING)
static int two = 2;
#endif
static int zero;
-static int one = 1;
static unsigned long one_ul = 1;
static int one_hundred = 100;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fix unused variable without softlock detection and highmem
2009-02-23 12:09 [PATCH] fix unused variable without softlock detection and highmem Nikanth Karthikesan
@ 2009-02-23 14:59 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2009-02-23 14:59 UTC (permalink / raw)
To: Nikanth Karthikesan; +Cc: Linus Torvalds, Peter Zijlstra, linux-kernel
* Nikanth Karthikesan <knikanth@suse.de> wrote:
> When both CONFIG_DETECT_SOFTLOCKUP and CONFIG_HIGHMEM are not
> defined avoid defining the constant for one fixing the 'define
> but not used' warning.
>
> Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
A variant of this is already fixed a bit differently in
tip:core/softlockup:
9f8d979: softlockup: move 'one' to the softlockup section in sysctl.c
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-23 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23 12:09 [PATCH] fix unused variable without softlock detection and highmem Nikanth Karthikesan
2009-02-23 14:59 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox