]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Consistently test DEBUG macro, not EFX_ENABLE_DEBUG
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 4 Nov 2011 22:29:14 +0000 (22:29 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Fri, 27 Jan 2012 00:10:48 +0000 (00:10 +0000)
commitfe966f8a4b135f58f895280e4be17902db509809
treedf8f27bfc7cccad5d2e08b3b6d513b7a5f8eb3b0
parent1896098f4d78b2d4d47606861e5d123ad6bd6adc
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>
drivers/net/ethernet/sfc/mtd.c
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/nic.c
drivers/net/ethernet/sfc/selftest.c