e1000e: fix debugging printout code
Subsystems (2)
PATCH 1/1 e1000e: fix debugging printout code
A small bug crawled in the -DDEBUG enabled code. Fix this to properly call the backreference device name.
---
drivers/net/e1000e/hw.h | 2 +- drivers/net/e1000e/netdev.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/net/e1000e/hw.h +1 -1
@@ -852,7 +852,7 @@ struct e1000_hw {#ifdef DEBUG #define hw_dbg(hw, format, arg...) \ - printk(KERN_DEBUG, "%s: " format, e1000_get_hw_dev_name(hw), ##arg); + printk(KERN_DEBUG, "%s: " format, e1000e_get_hw_dev_name(hw), ##arg);#else static inline int __attribute__ ((format (printf,2 ,3 )))hw_dbg (struct e1000_hw *hw,const char *format, ...)
drivers/net/e1000e/netdev.c +1 -3
@@ -66,9 +66,7 @@ static const struct e1000_info *e1000_info_tbl[] = {**/ char *e1000e_get_hw_dev_name (struct e1000_hw *hw) { -struct e1000_adapter *adapter = hw->back; -struct net_device *netdev = adapter->netdev; -return netdev->name; +return hw->adapter->netdev->name; }#endif
Quoted 15 lines · Auke Kok
A small bug crawled in the -DDEBUG enabled code. Fix this to properly call the backreference device name.
Signed-off-by Auke Kok <[email protected]>---
drivers/net/e1000e/hw.h | 2 +- drivers/net/e1000e/netdev.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-)drivers/net/e1000e/hw.h +0
-0
drivers/net/e1000e/hw.h struct e1000_hw { · line 855
Quoted 5 lines
drivers/net/e1000e/hw.h +1
-1@@ -852,7 +852,7 @@ struct e1000_hw {#ifdef DEBUG #define hw_dbg(hw, format, arg...) \ - printk(KERN_DEBUG, "%s: " format, e1000_get_hw_dev_name(hw), ##arg); + printk(KERN_DEBUG, "%s: " format, e1000e_get_hw_dev_name(hw), ##arg);
I will apply this, but, I strongly encourage deletion of this in favor of the existing dev_dbg()
Jeff
Quoted 6 lines · Jeff Garzik
Quoted 6 lines
drivers/net/e1000e/hw.h +0
-0@@ -852,7 +852,7 @@ struct e1000_hw {
Quoted 7 lines
drivers/net/e1000e/hw.h struct e1000_hw { · line 855
Quoted 4 lines
drivers/net/e1000e/hw.h +1
-1#ifdef DEBUG #define hw_dbg(hw, format, arg...) \ - printk(KERN_DEBUG, "%s: " format, e1000_get_hw_dev_name(hw), ##arg); + printk(KERN_DEBUG, "%s: " format, e1000e_get_hw_dev_name(hw), ##arg);I will apply this, but, I strongly encourage deletion of this in favor of the existing
dev_dbg()
Instead the fix should be for the 2 existing bugs on macro:
o Comma after KERN_DEBUG
o Semicolon in macro
Quoted 14 lines · Joe Perches
Quoted 6 lines · Jeff Garzik
Quoted 6 lines
drivers/net/e1000e/hw.h +0
-0@@ -852,7 +852,7 @@ struct e1000_hw {Quoted 6 lines
drivers/net/e1000e/hw.h struct e1000_hw { · line 855
Quoted 4 lines
drivers/net/e1000e/hw.h +1
-1#ifdef DEBUG #define hw_dbg(hw, format, arg...) \ - printk(KERN_DEBUG, "%s: " format, e1000_get_hw_dev_name(hw), ##arg); + printk(KERN_DEBUG, "%s: " format, e1000e_get_hw_dev_name(hw), ##arg);I will apply this, but, I strongly encourage deletion of this in favor of the existing
dev_dbg()
Quoted 4 lines
Instead the fix should be for the 2 existing bugs on macro:
o Comma after
KERN_DEBUG
o Semicolon in macro
will push a patch, thanks.
Auke
Quoted 4 lines · Auke
Quoted 3 lines
Instead the fix should be for the 2 existing bugs on macro:
o Comma afterKERN_DEBUG
o Semicolon in macrowill push a patch, thanks.
Perhaps you could fix this one too?
$ grep -P -r --include=*.[ch] "\bprintk\s*\(\s*KERN_[A-Z]+\s*\," * drivers/net/ucc_geth_mii.c:#define vdbg(format, arg...) printk(KERN_DEBUG , format "\n" , ## arg)
Quoted 10 lines · Joe Perches
Quoted 4 lines · Auke
Quoted 3 lines
Instead the fix should be for the 2 existing bugs on macro:
o Comma afterKERN_DEBUG
o Semicolon in macrowill push a patch, thanks.
Perhaps you could fix this one too?
$ grep -P -r --include=*.[ch] "\bprintk\s*\(\s*KERN_[A-Z]+\s*\," * drivers/net/ucc_geth_mii.c:#define vdbg(format, arg...) printk(KERN_DEBUG , format "\n" , ## arg)
Just send a patch yourself... :)
Auke
Jeff Garzik
AppliedQuoted 9 lines · Auke Kok
A small bug crawled in the -DDEBUG enabled code. Fix this to properly call the backreference device name.
Signed-off-by Auke Kok <[email protected]>---
drivers/net/e1000e/hw.h | 2 +- drivers/net/e1000e/netdev.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-)
applied