drivers/rapidio/devices/tsi721.c: make module parameter variable name unique

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

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Randy Dunlap <[email protected]>
Reported-by: kbuild test robot <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Matt Porter <[email protected]>
Cc: Alexandre Bounine <[email protected]>
Cc: Jérémy Lefaure <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Randy Dunlap 2017-03-31 15:12:10 -07:00 • committed by Linus Torvalds
commit 4785603bd0
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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