All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rapidio: tsi721: make module parameter variable name unique
@ 2017-03-20  1:58 Randy Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2017-03-20  1:58 UTC (permalink / raw)
  To: LKML
  Cc: Greg Kroah-Hartman, Fengguang Wu, Matt Porter, Alexandre Bounine,
	Andrew Morton

From: Randy Dunlap <rdunlap@infradead.org>

kbuild test robot reported a non-static variable name collision between
a staging driver and a RapidIO driver, with a generic variable name of
'dbg_level'.

Both drivers should be changed so that they don't use this generic
public variable name. This patch fixes the RapidIO driver but does not
change the user interface (name) for the module parameter.

drivers/staging/built-in.o:(.bss+0x109d0): multiple definition of `dbg_level'
drivers/rapidio/built-in.o:(.bss+0x16c): first defined here

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Alexandre Bounine <alexandre.bounine@idt.com>
---
 drivers/rapidio/devices/tsi721.c |    4 ++--
 drivers/rapidio/devices/tsi721.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--- lnx-411-rc2.orig/drivers/rapidio/devices/tsi721.c
+++ lnx-411-rc2/drivers/rapidio/devices/tsi721.c
@@ -37,8 +37,8 @@
 #include "tsi721.h"
 
 #ifdef DEBUG
-u32 dbg_level;
-module_param(dbg_level, uint, S_IWUSR | S_IRUGO);
+u32 tsi_dbg_level;
+module_param_named(dbg_level, tsi_dbg_level, uint, S_IWUSR | S_IRUGO);
 MODULE_PARM_DESC(dbg_level, "Debugging output level (default 0 = none)");
 #endif
 
--- lnx-411-rc2.orig/drivers/rapidio/devices/tsi721.h
+++ lnx-411-rc2/drivers/rapidio/devices/tsi721.h
@@ -40,11 +40,11 @@ enum {
 };
 
 #ifdef DEBUG
-extern u32 dbg_level;
+extern u32 tsi_dbg_level;
 
 #define tsi_debug(level, dev, fmt, arg...)				\
 	do {								\
-		if (DBG_##level & dbg_level)				\
+		if (DBG_##level & tsi_dbg_level)				\
 			dev_dbg(dev, "%s: " fmt "\n", __func__, ##arg);	\
 	} while (0)
 #else

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-20  1:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20  1:58 [PATCH] rapidio: tsi721: make module parameter variable name unique Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.