[openib-general] [PATCH] Rename debug_level to ipoib_debug_level

Roland Dreier roland at topspin.com
Tue Feb 22 13:24:32 PST 2005


This renames the variable "debug_level" to "ipoib_debug_level" in the
IPoIB module to avoid name clashes if IPoIB is built into the kernel.
SDP has the same variable name so this fixes "allyesconfig" for now.
module_param_named() is used to prevent the user-variable parameter
name from changing.

Libor, on general principles SDP should probably make the same change
to avoid polluting the namespace with generic names.

 - R.

Index: infiniband/ulp/ipoib/ipoib_main.c
===================================================================
--- infiniband/ulp/ipoib/ipoib_main.c	(revision 1865)
+++ infiniband/ulp/ipoib/ipoib_main.c	(working copy)
@@ -51,9 +51,9 @@ MODULE_DESCRIPTION("IP-over-InfiniBand n
 MODULE_LICENSE("Dual BSD/GPL");
 
 #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
-int debug_level;
+int ipoib_debug_level;
 
-module_param(debug_level, int, 0644);
+module_param_named(debug_level, ipoib_debug_level, int, 0644);
 MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0");
 #endif
 
Index: infiniband/ulp/ipoib/ipoib.h
===================================================================
--- infiniband/ulp/ipoib/ipoib.h	(revision 1865)
+++ infiniband/ulp/ipoib/ipoib.h	(working copy)
@@ -308,11 +308,11 @@ static inline void ipoib_unregister_debu
 
 
 #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
-extern int debug_level;
+extern int ipoib_debug_level;
 
 #define ipoib_dbg(priv, format, arg...)			\
 	do {					        \
-		if (debug_level > 0)			\
+		if (ipoib_debug_level > 0)			\
 			ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
 	} while (0)
 #define ipoib_dbg_mcast(priv, format, arg...)		\



More information about the general mailing list