summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/selftest.c
diff options
context:
space:
mode:
authorBen Hutchings2011-11-04 23:29:14 +0100
committerBen Hutchings2012-01-27 01:10:48 +0100
commit5f3f9d6c441faa323444b2f6b092d630fcd7d04c (patch)
treedf8f27bfc7cccad5d2e08b3b6d513b7a5f8eb3b0 /drivers/net/ethernet/sfc/selftest.c
parentsfc: Remove efx_nic_type::push_multicast_hash operation (diff)
downloadkernel-qcow2-linux-5f3f9d6c441faa323444b2f6b092d630fcd7d04c.tar.gz
kernel-qcow2-linux-5f3f9d6c441faa323444b2f6b092d630fcd7d04c.tar.xz
kernel-qcow2-linux-5f3f9d6c441faa323444b2f6b092d630fcd7d04c.zip
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/selftest.c')
-rw-r--r--drivers/net/ethernet/sfc/selftest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c
index 9df2a7942509..7718287ad0bc 100644
--- a/drivers/net/ethernet/sfc/selftest.c
+++ b/drivers/net/ethernet/sfc/selftest.c
@@ -315,7 +315,7 @@ void efx_loopback_rx_packet(struct efx_nic *efx,
return;
err:
-#ifdef EFX_ENABLE_DEBUG
+#ifdef DEBUG
if (atomic_read(&state->rx_bad) == 0) {
netif_err(efx, drv, efx->net_dev, "received packet:\n");
print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 0x10, 1,