xen/tmem: Fix compile warning.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 8 May 2013 20:57:35 +0000 (16:57 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 15 May 2013 14:27:45 +0000 (10:27 -0400)
We keep on getting:
drivers/xen/tmem.c:65:13: warning: â€˜disable_frontswap_selfshrinking’ defined but not used [-Wunused-variable]

if CONFIG_FRONTSWAP=y and # CONFIG_CLEANCACHE is not set

Found by 0 day test project

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/tmem.c

index c2ee1887806a44e02675dea0c49982210ede4304..30bf97475e130849630ffc1bb558130887552d07 100644 (file)
@@ -61,14 +61,12 @@ __setup("nofrontswap", no_frontswap);
 #endif
 #endif /* CONFIG_FRONTSWAP */
 
-#ifdef CONFIG_FRONTSWAP
+#ifdef CONFIG_XEN_SELFBALLOONING
 static bool disable_frontswap_selfshrinking __read_mostly;
 #ifdef CONFIG_XEN_TMEM_MODULE
 module_param(disable_frontswap_selfshrinking, bool, S_IRUGO);
-#else
-#define disable_frontswap_selfshrinking 1
 #endif
-#endif /* CONFIG_FRONTSWAP */
+#endif /* CONFIG_XEN_SELFBALLOONING */
 
 #define TMEM_CONTROL               0
 #define TMEM_NEW_POOL              1