diff options
author | Joe Perches <joe@perches.com> | 2010-02-17 15:01:52 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 17:45:20 -0800 |
commit | 7995c64e5b56ec7fe6032e5fc586f726cde2152b (patch) | |
tree | b072d2e42f717d8f2c3d94e9431c48a3e8304f72 /drivers/net/bnx2x_link.c | |
parent | 3a9c6a4915e584663aebdb9016bcb9d3897dd779 (diff) | |
download | blackbird-op-linux-7995c64e5b56ec7fe6032e5fc586f726cde2152b.tar.gz blackbird-op-linux-7995c64e5b56ec7fe6032e5fc586f726cde2152b.zip |
drivers/net/bnx2x: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Convert struct bnx2x member msglevel to msg_enable for netif_msg_<foo> macros
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Coalesce long formats
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_link.c')
-rw-r--r-- | drivers/net/bnx2x_link.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c index cf5778919b4b..32e79c359e89 100644 --- a/drivers/net/bnx2x_link.c +++ b/drivers/net/bnx2x_link.c @@ -14,6 +14,8 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/kernel.h> #include <linux/errno.h> #include <linux/pci.h> @@ -2987,11 +2989,8 @@ static u8 bnx2x_verify_sfp_module(struct link_params *params) else vendor_pn[SFP_EEPROM_PART_NO_SIZE] = '\0'; - printk(KERN_INFO PFX "Warning: " - "Unqualified SFP+ module " - "detected on %s, Port %d from %s part number %s\n" - , bp->dev->name, params->port, - vendor_name, vendor_pn); + netdev_info(bp->dev, "Warning: Unqualified SFP+ module detected, Port %d from %s part number %s\n", + params->port, vendor_name, vendor_pn); return -EINVAL; } @@ -4846,16 +4845,8 @@ static u8 bnx2x_ext_phy_is_link_up(struct link_params *params, " has been detected on " "port %d\n", params->port); - printk(KERN_ERR PFX "Error: Power" - " fault on %s Port %d has" - " been detected and the" - " power to that SFP+ module" - " has been removed to prevent" - " failure of the card. Please" - " remove the SFP+ module and" - " restart the system to clear" - " this error.\n" - , bp->dev->name, params->port); + netdev_err(bp->dev, "Error: Power fault on Port %d has been detected and the power to that SFP+ module has been removed to prevent failure of the card. Please remove the SFP+ module and restart the system to clear this error.\n", + params->port); /* * Disable all RX_ALARMs except for * mod_abs |