lkml.org 
[lkml]   [2017]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rapidio/tsi721: change name of module parameter to avoid name conflicts
Date
The name dbg_level is a generic name and can conflicts with other
modules:

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

Prefixing this variable with the name of the module fix the build issue.

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
---
drivers/rapidio/devices/tsi721.c | 7 ++++---
drivers/rapidio/devices/tsi721.h | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c
index 9d19b9a62011..ca4dcb475f41 100644
--- a/drivers/rapidio/devices/tsi721.c
+++ b/drivers/rapidio/devices/tsi721.c
@@ -37,9 +37,10 @@
#include "tsi721.h"

#ifdef DEBUG
-u32 dbg_level;
-module_param(dbg_level, uint, S_IWUSR | S_IRUGO);
-MODULE_PARM_DESC(dbg_level, "Debugging output level (default 0 = none)");
+u32 tsi721_dbg_level;
+module_param(tsi721_dbg_level, uint, S_IWUSR | S_IRUGO);
+MODULE_PARM_DESC(tsi721_dbg_level,
+ "Debugging output level (default 0 = none)");
#endif

static int pcie_mrrs = -1;
diff --git a/drivers/rapidio/devices/tsi721.h b/drivers/rapidio/devices/tsi721.h
index 5941437cbdd1..c700f90153ac 100644
--- a/drivers/rapidio/devices/tsi721.h
+++ b/drivers/rapidio/devices/tsi721.h
@@ -40,11 +40,11 @@ enum {
};

#ifdef DEBUG
-extern u32 dbg_level;
+extern u32 tsi721_dbg_level;

#define tsi_debug(level, dev, fmt, arg...) \
do { \
- if (DBG_##level & dbg_level) \
+ if (DBG_##level & tsi721_dbg_level) \
dev_dbg(dev, "%s: " fmt "\n", __func__, ##arg); \
} while (0)
#else
--
2.12.0
\
 
 \ /
  Last update: 2017-03-21 04:37    [W:0.032 / U:3.308 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site