All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] e1000e: fix debugging printout code
@ 2007-10-04 18:38 Auke Kok
  2007-10-05 17:53 ` Jeff Garzik
  2007-10-05 17:56 ` Jeff Garzik
  0 siblings, 2 replies; 7+ messages in thread
From: Auke Kok @ 2007-10-04 18:38 UTC (permalink / raw)
  To: jeff; +Cc: netdev

A small bug crawled in the -DDEBUG enabled code. Fix this to
properly call the backreference device name.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---

 drivers/net/e1000e/hw.h     |    2 +-
 drivers/net/e1000e/netdev.c |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
index 848217a..aa82f1a 100644
--- a/drivers/net/e1000e/hw.h
+++ b/drivers/net/e1000e/hw.h
@@ -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, ...)
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 4a21d7d..3a0bb2a 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -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
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] e1000e: fix debugging printout code
  2007-10-04 18:38 [PATCH] e1000e: fix debugging printout code Auke Kok
@ 2007-10-05 17:53 ` Jeff Garzik
  2007-10-15 16:00   ` Joe Perches
  2007-10-05 17:56 ` Jeff Garzik
  1 sibling, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2007-10-05 17:53 UTC (permalink / raw)
  To: Auke Kok; +Cc: netdev

Auke Kok wrote:
> A small bug crawled in the -DDEBUG enabled code. Fix this to
> properly call the backreference device name.
> 
> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
> ---
> 
>  drivers/net/e1000e/hw.h     |    2 +-
>  drivers/net/e1000e/netdev.c |    4 +---
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
> index 848217a..aa82f1a 100644
> --- a/drivers/net/e1000e/hw.h
> +++ b/drivers/net/e1000e/hw.h
> @@ -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




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] e1000e: fix debugging printout code
  2007-10-04 18:38 [PATCH] e1000e: fix debugging printout code Auke Kok
  2007-10-05 17:53 ` Jeff Garzik
@ 2007-10-05 17:56 ` Jeff Garzik
  1 sibling, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2007-10-05 17:56 UTC (permalink / raw)
  To: Auke Kok; +Cc: netdev

Auke Kok wrote:
> A small bug crawled in the -DDEBUG enabled code. Fix this to
> properly call the backreference device name.
> 
> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
> ---
> 
>  drivers/net/e1000e/hw.h     |    2 +-
>  drivers/net/e1000e/netdev.c |    4 +---
>  2 files changed, 2 insertions(+), 4 deletions(-)

applied



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] e1000e: fix debugging printout code
  2007-10-05 17:53 ` Jeff Garzik
@ 2007-10-15 16:00   ` Joe Perches
  2007-10-15 16:20     ` Kok, Auke
  0 siblings, 1 reply; 7+ messages in thread
From: Joe Perches @ 2007-10-15 16:00 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Auke Kok, netdev

On Fri, 2007-10-05 at 13:53 -0400, Jeff Garzik wrote:
> > diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
> > index 848217a..aa82f1a 100644
> > --- a/drivers/net/e1000e/hw.h
> > +++ b/drivers/net/e1000e/hw.h
> > @@ -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()

Instead the fix should be for the 2 existing bugs on macro:

o Comma after KERN_DEBUG
o Semicolon in macro


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] e1000e: fix debugging printout code
  2007-10-15 16:00   ` Joe Perches
@ 2007-10-15 16:20     ` Kok, Auke
  2007-10-15 17:05       ` Joe Perches
  0 siblings, 1 reply; 7+ messages in thread
From: Kok, Auke @ 2007-10-15 16:20 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jeff Garzik, Auke Kok, netdev

Joe Perches wrote:
> On Fri, 2007-10-05 at 13:53 -0400, Jeff Garzik wrote:
>>> diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
>>> index 848217a..aa82f1a 100644
>>> --- a/drivers/net/e1000e/hw.h
>>> +++ b/drivers/net/e1000e/hw.h
>>> @@ -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()
> 
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] e1000e: fix debugging printout code
  2007-10-15 16:20     ` Kok, Auke
@ 2007-10-15 17:05       ` Joe Perches
  2007-10-15 17:32         ` Kok, Auke
  0 siblings, 1 reply; 7+ messages in thread
From: Joe Perches @ 2007-10-15 17:05 UTC (permalink / raw)
  To: Kok, Auke; +Cc: Jeff Garzik, netdev

On Mon, 2007-10-15 at 09:20 -0700, Kok, Auke wrote:
> > 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.

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)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] e1000e: fix debugging printout code
  2007-10-15 17:05       ` Joe Perches
@ 2007-10-15 17:32         ` Kok, Auke
  0 siblings, 0 replies; 7+ messages in thread
From: Kok, Auke @ 2007-10-15 17:32 UTC (permalink / raw)
  To: Joe Perches; +Cc: Kok, Auke, Jeff Garzik, netdev

Joe Perches wrote:
> On Mon, 2007-10-15 at 09:20 -0700, Kok, Auke wrote:
>>> 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.
> 
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-10-15 17:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-04 18:38 [PATCH] e1000e: fix debugging printout code Auke Kok
2007-10-05 17:53 ` Jeff Garzik
2007-10-15 16:00   ` Joe Perches
2007-10-15 16:20     ` Kok, Auke
2007-10-15 17:05       ` Joe Perches
2007-10-15 17:32         ` Kok, Auke
2007-10-05 17:56 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.