aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-10-21 15:38:18 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-11-16 07:32:38 -0500
commitdbd9636e281895cd3a15682f0966fb545ddff9e8 (patch)
tree40309afb4ffd70f90a0f75ceaaa7fd099623c47d
parenta4ba8cbeeb07f7bc8f9bcbd3f9962adb50376034 (diff)
ixgbevf: Convert printks to pr_<level>
Based on the original patch from Joe Perches <joe@perches.com> Use the current logging styles, prefix output with "ixgbevf: " Add #define pr_fmt Coalesce formats. -v2 Fix-up to make checkpatch.pl compliant and remove change to copyright line CC: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Sibai Li <sibai.li@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ethtool.c6
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c27
2 files changed, 18 insertions, 15 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
index e29ba4506b74..149fa520d7f2 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
@@ -27,6 +27,8 @@
27 27
28/* ethtool support for ixgbevf */ 28/* ethtool support for ixgbevf */
29 29
30#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
31
30#include <linux/types.h> 32#include <linux/types.h>
31#include <linux/module.h> 33#include <linux/module.h>
32#include <linux/slab.h> 34#include <linux/slab.h>
@@ -549,8 +551,8 @@ static const u32 register_test_patterns[] = {
549 writel((W & M), (adapter->hw.hw_addr + R)); \ 551 writel((W & M), (adapter->hw.hw_addr + R)); \
550 val = readl(adapter->hw.hw_addr + R); \ 552 val = readl(adapter->hw.hw_addr + R); \
551 if ((W & M) != (val & M)) { \ 553 if ((W & M) != (val & M)) { \
552 printk(KERN_ERR "set/check reg %04X test failed: got 0x%08X " \ 554 pr_err("set/check reg %04X test failed: got 0x%08X expected " \
553 "expected 0x%08X\n", R, (val & M), (W & M)); \ 555 "0x%08X\n", R, (val & M), (W & M)); \
554 *data = R; \ 556 *data = R; \
555 writel(before, (adapter->hw.hw_addr + R)); \ 557 writel(before, (adapter->hw.hw_addr + R)); \
556 return 1; \ 558 return 1; \
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 4c8e19951d57..b2ece53ccf60 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -29,6 +29,9 @@
29/****************************************************************************** 29/******************************************************************************
30 Copyright (c)2006 - 2007 Myricom, Inc. for some LRO specific code 30 Copyright (c)2006 - 2007 Myricom, Inc. for some LRO specific code
31******************************************************************************/ 31******************************************************************************/
32
33#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
34
32#include <linux/types.h> 35#include <linux/types.h>
33#include <linux/bitops.h> 36#include <linux/bitops.h>
34#include <linux/module.h> 37#include <linux/module.h>
@@ -1437,7 +1440,7 @@ static int ixgbevf_write_uc_addr_list(struct net_device *netdev)
1437 int count = 0; 1440 int count = 0;
1438 1441
1439 if ((netdev_uc_count(netdev)) > 10) { 1442 if ((netdev_uc_count(netdev)) > 10) {
1440 printk(KERN_ERR "Too many unicast filters - No Space\n"); 1443 pr_err("Too many unicast filters - No Space\n");
1441 return -ENOSPC; 1444 return -ENOSPC;
1442 } 1445 }
1443 1446
@@ -2135,7 +2138,7 @@ static int ixgbevf_init_interrupt_scheme(struct ixgbevf_adapter *adapter)
2135 2138
2136 err = ixgbevf_alloc_queues(adapter); 2139 err = ixgbevf_alloc_queues(adapter);
2137 if (err) { 2140 if (err) {
2138 printk(KERN_ERR "Unable to allocate memory for queues\n"); 2141 pr_err("Unable to allocate memory for queues\n");
2139 goto err_alloc_queues; 2142 goto err_alloc_queues;
2140 } 2143 }
2141 2144
@@ -2189,7 +2192,7 @@ static int __devinit ixgbevf_sw_init(struct ixgbevf_adapter *adapter)
2189 } else { 2192 } else {
2190 err = hw->mac.ops.init_hw(hw); 2193 err = hw->mac.ops.init_hw(hw);
2191 if (err) { 2194 if (err) {
2192 printk(KERN_ERR "init_shared_code failed: %d\n", err); 2195 pr_err("init_shared_code failed: %d\n", err);
2193 goto out; 2196 goto out;
2194 } 2197 }
2195 } 2198 }
@@ -2630,8 +2633,8 @@ static int ixgbevf_open(struct net_device *netdev)
2630 * the vf can't start. */ 2633 * the vf can't start. */
2631 if (hw->adapter_stopped) { 2634 if (hw->adapter_stopped) {
2632 err = IXGBE_ERR_MBX; 2635 err = IXGBE_ERR_MBX;
2633 printk(KERN_ERR "Unable to start - perhaps the PF" 2636 pr_err("Unable to start - perhaps the PF Driver isn't "
2634 " Driver isn't up yet\n"); 2637 "up yet\n");
2635 goto err_setup_reset; 2638 goto err_setup_reset;
2636 } 2639 }
2637 } 2640 }
@@ -2842,10 +2845,8 @@ static bool ixgbevf_tx_csum(struct ixgbevf_adapter *adapter,
2842 break; 2845 break;
2843 default: 2846 default:
2844 if (unlikely(net_ratelimit())) { 2847 if (unlikely(net_ratelimit())) {
2845 printk(KERN_WARNING 2848 pr_warn("partial checksum but "
2846 "partial checksum but " 2849 "proto=%x!\n", skb->protocol);
2847 "proto=%x!\n",
2848 skb->protocol);
2849 } 2850 }
2850 break; 2851 break;
2851 } 2852 }
@@ -3414,7 +3415,7 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev,
3414 memcpy(netdev->perm_addr, adapter->hw.mac.addr, netdev->addr_len); 3415 memcpy(netdev->perm_addr, adapter->hw.mac.addr, netdev->addr_len);
3415 3416
3416 if (!is_valid_ether_addr(netdev->dev_addr)) { 3417 if (!is_valid_ether_addr(netdev->dev_addr)) {
3417 printk(KERN_ERR "invalid MAC address\n"); 3418 pr_err("invalid MAC address\n");
3418 err = -EIO; 3419 err = -EIO;
3419 goto err_sw_init; 3420 goto err_sw_init;
3420 } 3421 }
@@ -3535,10 +3536,10 @@ static struct pci_driver ixgbevf_driver = {
3535static int __init ixgbevf_init_module(void) 3536static int __init ixgbevf_init_module(void)
3536{ 3537{
3537 int ret; 3538 int ret;
3538 printk(KERN_INFO "ixgbevf: %s - version %s\n", ixgbevf_driver_string, 3539 pr_info("%s - version %s\n", ixgbevf_driver_string,
3539 ixgbevf_driver_version); 3540 ixgbevf_driver_version);
3540 3541
3541 printk(KERN_INFO "%s\n", ixgbevf_copyright); 3542 pr_info("%s\n", ixgbevf_copyright);
3542 3543
3543 ret = pci_register_driver(&ixgbevf_driver); 3544 ret = pci_register_driver(&ixgbevf_driver);
3544 return ret; 3545 return ret;