Skip to contentSkip to conversation

fix unused variable without softlock detection and highmem

PATCH In review Nikanth Karthikesan 2 participants 2 messages Feb 23, 2009 Proc sysctl

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix unused variable without softlock detection and highmem

When both CONFIG_DETECT_SOFTLOCKUP and CONFIG_HIGHMEM are not defined avoid defining the constant for one fixing the 'define but not used' warning.

---

kernel/sysctl.c +4 -1
index c5ef44f..f172d9f 100644
@@ -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;
 
#1 lore raw
Quoted 5 lines · Nikanth Karthikesan

When both CONFIG_DETECT_SOFTLOCKUP and CONFIG_HIGHMEM are not defined avoid defining the constant for one fixing the 'define but not used' warning.

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