Commit 8544b9f7 authored by Bruce Allan's avatar Bruce Allan Committed by David S. Miller

e1000e: Use pr_<level> and netdev_<level>

As an alternative to a quite large patch previously submitted by Joe
Perches to make use of kernel logging API, this patch is much less
intrusive.

Convert e_<level> to netdev_<level>
Use #define pr_fmt
Convert a few printks to pr_<level>

Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 66aa4a55
...@@ -42,25 +42,16 @@ ...@@ -42,25 +42,16 @@
struct e1000_info; struct e1000_info;
#define e_printk(level, adapter, format, arg...) \
printk(level "%s: %s: " format, pci_name(adapter->pdev), \
adapter->netdev->name, ## arg)
#ifdef DEBUG
#define e_dbg(format, arg...) \ #define e_dbg(format, arg...) \
e_printk(KERN_DEBUG , hw->adapter, format, ## arg) netdev_dbg(hw->adapter->netdev, format, ## arg)
#else
#define e_dbg(format, arg...) do { (void)(hw); } while (0)
#endif
#define e_err(format, arg...) \ #define e_err(format, arg...) \
e_printk(KERN_ERR, adapter, format, ## arg) netdev_err(adapter->netdev, format, ## arg)
#define e_info(format, arg...) \ #define e_info(format, arg...) \
e_printk(KERN_INFO, adapter, format, ## arg) netdev_info(adapter->netdev, format, ## arg)
#define e_warn(format, arg...) \ #define e_warn(format, arg...) \
e_printk(KERN_WARNING, adapter, format, ## arg) netdev_warn(adapter->netdev, format, ## arg)
#define e_notice(format, arg...) \ #define e_notice(format, arg...) \
e_printk(KERN_NOTICE, adapter, format, ## arg) netdev_notice(adapter->netdev, format, ## arg)
/* Interrupt modes, as used by the IntMode parameter */ /* Interrupt modes, as used by the IntMode parameter */
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
*******************************************************************************/ *******************************************************************************/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -5509,10 +5511,9 @@ static struct pci_driver e1000_driver = { ...@@ -5509,10 +5511,9 @@ static struct pci_driver e1000_driver = {
static int __init e1000_init_module(void) static int __init e1000_init_module(void)
{ {
int ret; int ret;
printk(KERN_INFO "%s: Intel(R) PRO/1000 Network Driver - %s\n", pr_info("Intel(R) PRO/1000 Network Driver - %s\n",
e1000e_driver_name, e1000e_driver_version); e1000e_driver_version);
printk(KERN_INFO "%s: Copyright (c) 1999 - 2009 Intel Corporation.\n", pr_info("Copyright (c) 1999 - 2009 Intel Corporation.\n");
e1000e_driver_name);
ret = pci_register_driver(&e1000_driver); ret = pci_register_driver(&e1000_driver);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment