Skip to contentSkip to conversation

kernel: fix dynamic printk sparse warnings

PATCH New Harvey Harrison 1 participant 1 message Aug 19, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel: fix dynamic printk sparse warnings

ret is a common variable name and creates scads of shadowed variable warnings. Change to using __ret inside the dynamic_debug_enabled macro.

---
 include/linux/dynamic_printk.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
include/linux/dynamic_printk.h +3 -3
index c54cf84..2d528d0 100644
@@ -37,12 +37,12 @@ extern int __dynamic_dbg_enabled_helper(char *modname, int type,
 					int value, int hash);
 
 #define __dynamic_dbg_enabled(module, type, value, level, hash)  ({	     \
-	int ret = 0;							     \
+	int __ret = 0;							     \
 	if (unlikely((dynamic_printk_enabled & (1LL << DEBUG_HASH)) &&	     \
 			(dynamic_printk_enabled2 & (1LL << DEBUG_HASH2))))   \
-			ret = __dynamic_dbg_enabled_helper(module, type,     \
+			__ret = __dynamic_dbg_enabled_helper(module, type,   \
 								value, hash);\
-	ret; })
+	__ret; })
 
 #define dynamic_pr_debug(fmt, ...) do {					    \
 	static char mod_name[]						    \
Signature · 1 line
1.6.0.274.g8aacc