aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2011-11-04 18:29:14 -0400
committerBen Hutchings <bhutchings@solarflare.com>2012-01-26 19:10:48 -0500
commit5f3f9d6c441faa323444b2f6b092d630fcd7d04c (patch)
treedf8f27bfc7cccad5d2e08b3b6d513b7a5f8eb3b0 /drivers/net/ethernet/sfc/net_driver.h
parent30b81cda9516878906b44fed16aac9df1dbb89c7 (diff)
sfc: Consistently test DEBUG macro, not EFX_ENABLE_DEBUG
The netif_dbg() macro is defined in <linux/netdevice.h>. If the DEBUG macro is defined, it logs a message at 'debug' level, otherwise it does nothing. In net_driver.h we define DEBUG if EFX_ENABLE_DEBUG is defined, but this is too late for those source files that already got a definition of netif_dbg() by including <linux/netdevice.h> Get rid of EFX_ENABLE_DEBUG, and only define and test DEBUG. In mtd.c, we do not use DEBUG as a condition flag but are forced to use the DEBUG macro-function from <linux/mtd/mtd.h>. Undefine DEBUG before including it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/net_driver.h')
-rw-r--r--drivers/net/ethernet/sfc/net_driver.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index a88e95f58b0a..4cbd997e378b 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -13,10 +13,6 @@
13#ifndef EFX_NET_DRIVER_H 13#ifndef EFX_NET_DRIVER_H
14#define EFX_NET_DRIVER_H 14#define EFX_NET_DRIVER_H
15 15
16#if defined(EFX_ENABLE_DEBUG) && !defined(DEBUG)
17#define DEBUG
18#endif
19
20#include <linux/netdevice.h> 16#include <linux/netdevice.h>
21#include <linux/etherdevice.h> 17#include <linux/etherdevice.h>
22#include <linux/ethtool.h> 18#include <linux/ethtool.h>
@@ -42,7 +38,7 @@
42 38
43#define EFX_DRIVER_VERSION "3.1" 39#define EFX_DRIVER_VERSION "3.1"
44 40
45#ifdef EFX_ENABLE_DEBUG 41#ifdef DEBUG
46#define EFX_BUG_ON_PARANOID(x) BUG_ON(x) 42#define EFX_BUG_ON_PARANOID(x) BUG_ON(x)
47#define EFX_WARN_ON_PARANOID(x) WARN_ON(x) 43#define EFX_WARN_ON_PARANOID(x) WARN_ON(x)
48#else 44#else