[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8DD2590731AB5D4C9DBF71A877482A9061B3334E@orsmsx509.amr.corp.intel.com>
Date: Wed, 24 Mar 2010 16:54:48 -0700
From: "Allan, Bruce W" <bruce.w.allan@...el.com>
To: Joe Perches <joe@...ches.com>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"gospo@...hat.com" <gospo@...hat.com>
Subject: RE: [PATCH] e1000e: Use pr_<level> and netdev_<level>
On Wednesday, March 24, 2010 4:43 PM, Joe Perches wrote:
> On Wed, 2010-03-24 at 15:55 -0700, Jeff Kirsher wrote:
>> From: Bruce Allan <bruce.w.allan@...el.com>
>> 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.
> []
>> diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h
>> index 118bdf4..23ab67c 100644 --- a/drivers/net/e1000e/e1000.h
>> +++ b/drivers/net/e1000e/e1000.h
>> @@ -42,25 +42,16 @@
>>
>> 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...) \
>> - e_printk(KERN_DEBUG , hw->adapter, format, ## arg)
>> -#else
>> -#define e_dbg(format, arg...) do { (void)(hw); } while (0)
>> -#endif
>> -
>> + netdev_dbg(hw->adapter->netdev, 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...) \
>> - e_printk(KERN_INFO, adapter, format, ## arg)
>> + netdev_info(adapter->netdev, 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...) \
>> - e_printk(KERN_NOTICE, adapter, format, ## arg)
>> + netdev_notice(adapter->netdev, format, ## arg)
>
> Macros that use global variables are undesirable.
>
> I think there's value in using standard mechanisms.
>
> cheers, Joe
No global variable is used - both adapter and hw are either a local variable or a passed in parameter for all functions that use these macros.--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists