fix unused variable without softlock detection and highmem
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.
Signed-off-by Nikanth Karthikesan <[email protected]>
---
kernel/sysctl.c +4 -1
@@ -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 ;
Quoted 5 lines · Nikanth Karthikesan
When both
CONFIG_DETECT_SOFTLOCKUPandCONFIG_HIGHMEMare not defined avoid defining the constant for one fixing the 'define but not used' warning.Signed-off-by Nikanth Karthikesan <[email protected]>
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