All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tilegx: request_irq with a non-null device name
@ 2012-11-13 20:58 Simon Marchi
  2012-11-13 21:37 ` Chris Metcalf
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2012-11-13 20:58 UTC (permalink / raw)
  To: cmetcalf; +Cc: netdev, linux-kernel, Simon Marchi

This patch simply makes the tilegx net driver call request_irq with a
non-null name. It makes the output in /proc/interrupts more obvious, but
also helps tools that don't expect to find null there.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
---
 drivers/net/ethernet/tile/tilegx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
index 4e98100..66e025a 100644
--- a/drivers/net/ethernet/tile/tilegx.c
+++ b/drivers/net/ethernet/tile/tilegx.c
@@ -917,7 +917,7 @@ static int tile_net_setup_interrupts(struct net_device *dev)
 	ingress_irq = rc;
 	tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU);
 	rc = request_irq(ingress_irq, tile_net_handle_ingress_irq,
-			 0, NULL, NULL);
+			 0, "tile_net", NULL);
 	if (rc != 0) {
 		netdev_err(dev, "request_irq failed: %d\n", rc);
 		destroy_irq(ingress_irq);
-- 
1.7.1


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

* Re: [PATCH] tilegx: request_irq with a non-null device name
  2012-11-13 20:58 [PATCH] tilegx: request_irq with a non-null device name Simon Marchi
@ 2012-11-13 21:37 ` Chris Metcalf
  2012-11-13 21:50   ` Stephen Hemminger
  2012-11-13 21:54   ` Simon Marchi
  0 siblings, 2 replies; 7+ messages in thread
From: Chris Metcalf @ 2012-11-13 21:37 UTC (permalink / raw)
  To: Simon Marchi; +Cc: netdev, linux-kernel

On 11/13/2012 3:58 PM, Simon Marchi wrote:
> This patch simply makes the tilegx net driver call request_irq with a
> non-null name. It makes the output in /proc/interrupts more obvious, but
> also helps tools that don't expect to find null there.
>
> Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
> ---
>  drivers/net/ethernet/tile/tilegx.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
> index 4e98100..66e025a 100644
> --- a/drivers/net/ethernet/tile/tilegx.c
> +++ b/drivers/net/ethernet/tile/tilegx.c
> @@ -917,7 +917,7 @@ static int tile_net_setup_interrupts(struct net_device *dev)
>  	ingress_irq = rc;
>  	tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU);
>  	rc = request_irq(ingress_irq, tile_net_handle_ingress_irq,
> -			 0, NULL, NULL);
> +			 0, "tile_net", NULL);

Good catch.  If you can change it to dev->name instead of "tile_net", feel
free to add my:

Acked-by: Chris Metcalf <cmetcalf@tilera.com>

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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

* Re: [PATCH] tilegx: request_irq with a non-null device name
  2012-11-13 21:37 ` Chris Metcalf
@ 2012-11-13 21:50   ` Stephen Hemminger
  2012-11-13 21:54   ` Simon Marchi
  1 sibling, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2012-11-13 21:50 UTC (permalink / raw)
  To: Chris Metcalf; +Cc: Simon Marchi, netdev, linux-kernel

On Tue, 13 Nov 2012 16:37:11 -0500
Chris Metcalf <cmetcalf@tilera.com> wrote:

> On 11/13/2012 3:58 PM, Simon Marchi wrote:
> > This patch simply makes the tilegx net driver call request_irq with a
> > non-null name. It makes the output in /proc/interrupts more obvious, but
> > also helps tools that don't expect to find null there.
> >
> > Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
> > ---
> >  drivers/net/ethernet/tile/tilegx.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
> > index 4e98100..66e025a 100644
> > --- a/drivers/net/ethernet/tile/tilegx.c
> > +++ b/drivers/net/ethernet/tile/tilegx.c
> > @@ -917,7 +917,7 @@ static int tile_net_setup_interrupts(struct net_device *dev)
> >  	ingress_irq = rc;
> >  	tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU);
> >  	rc = request_irq(ingress_irq, tile_net_handle_ingress_irq,
> > -			 0, NULL, NULL);
> > +			 0, "tile_net", NULL);
> 
> Good catch.  If you can change it to dev->name instead of "tile_net", feel
> free to add my:
> 
> Acked-by: Chris Metcalf <cmetcalf@tilera.com>
> 

It really should be using dev->name since that helps out some
applications like irqbalance that read /proc/interrupts

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

* Re: [PATCH] tilegx: request_irq with a non-null device name
  2012-11-13 21:37 ` Chris Metcalf
  2012-11-13 21:50   ` Stephen Hemminger
@ 2012-11-13 21:54   ` Simon Marchi
  2012-11-13 21:59     ` Chris Metcalf
  1 sibling, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2012-11-13 21:54 UTC (permalink / raw)
  To: Chris Metcalf; +Cc: netdev, linux-kernel

On Tue, Nov 13, 2012 at 1:37 PM, Chris Metcalf <cmetcalf@tilera.com> wrote:
> On 11/13/2012 3:58 PM, Simon Marchi wrote:
>> This patch simply makes the tilegx net driver call request_irq with a
>> non-null name. It makes the output in /proc/interrupts more obvious, but
>> also helps tools that don't expect to find null there.
>>
>> Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
>> ---
>>  drivers/net/ethernet/tile/tilegx.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
>> index 4e98100..66e025a 100644
>> --- a/drivers/net/ethernet/tile/tilegx.c
>> +++ b/drivers/net/ethernet/tile/tilegx.c
>> @@ -917,7 +917,7 @@ static int tile_net_setup_interrupts(struct net_device *dev)
>>       ingress_irq = rc;
>>       tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU);
>>       rc = request_irq(ingress_irq, tile_net_handle_ingress_irq,
>> -                      0, NULL, NULL);
>> +                      0, "tile_net", NULL);
>
> Good catch.  If you can change it to dev->name instead of "tile_net", feel
> free to add my:

I thought about that first, but it wouldn't be very logical. This
module is loaded once and for all when the first network device is
brought up, so this request_irq is for all the tile network
interfaces. Suppose you "up" gbe0, "up" gbe1 and "down" gbe0, the
device name would still be gbe0, even though it's down. That's why I
opted for a generic name instead.

If you still want to go with dev->name I have no problem with that.

> Acked-by: Chris Metcalf <cmetcalf@tilera.com>
>
> --
> Chris Metcalf, Tilera Corp.
> http://www.tilera.com
>

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

* Re: [PATCH] tilegx: request_irq with a non-null device name
  2012-11-13 21:54   ` Simon Marchi
@ 2012-11-13 21:59     ` Chris Metcalf
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Metcalf @ 2012-11-13 21:59 UTC (permalink / raw)
  To: Simon Marchi; +Cc: netdev, linux-kernel

On 11/13/2012 4:54 PM, Simon Marchi wrote:
> On Tue, Nov 13, 2012 at 1:37 PM, Chris Metcalf <cmetcalf@tilera.com> wrote:
>> On 11/13/2012 3:58 PM, Simon Marchi wrote:
>>> This patch simply makes the tilegx net driver call request_irq with a
>>> non-null name. It makes the output in /proc/interrupts more obvious, but
>>> also helps tools that don't expect to find null there.
>>>
>>> Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
>>> ---
>>>  drivers/net/ethernet/tile/tilegx.c |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
>>> index 4e98100..66e025a 100644
>>> --- a/drivers/net/ethernet/tile/tilegx.c
>>> +++ b/drivers/net/ethernet/tile/tilegx.c
>>> @@ -917,7 +917,7 @@ static int tile_net_setup_interrupts(struct net_device *dev)
>>>       ingress_irq = rc;
>>>       tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU);
>>>       rc = request_irq(ingress_irq, tile_net_handle_ingress_irq,
>>> -                      0, NULL, NULL);
>>> +                      0, "tile_net", NULL);
>> Good catch.  If you can change it to dev->name instead of "tile_net", feel
>> free to add my:
> I thought about that first, but it wouldn't be very logical. This
> module is loaded once and for all when the first network device is
> brought up, so this request_irq is for all the tile network
> interfaces. Suppose you "up" gbe0, "up" gbe1 and "down" gbe0, the
> device name would still be gbe0, even though it's down. That's why I
> opted for a generic name instead.
>
> If you still want to go with dev->name I have no problem with that.

No, you're right, that's a good point.  It does probably make more sense to
use "tile_net".  So apply my Acked-by to your patch as-is.  Thanks!

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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

* Re: [PATCH] tilegx: request_irq with a non-null device name
  2012-11-16  4:13 Simon Marchi
@ 2012-11-16  6:40 ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2012-11-16  6:40 UTC (permalink / raw)
  To: simon.marchi; +Cc: netdev, linux-kernel, cmetcalf

From: Simon Marchi <simon.marchi@polymtl.ca>
Date: Thu, 15 Nov 2012 23:13:19 -0500

> This patch simply makes the tilegx net driver call request_irq with a
> non-null name. It makes the output in /proc/interrupts more obvious, but
> also helps tools that don't expect to find null there.
> 
> Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
> Acked-by: Chris Metcalf <cmetcalf@tilera.com>

Applied, thanks.

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

* [PATCH] tilegx: request_irq with a non-null device name
@ 2012-11-16  4:13 Simon Marchi
  2012-11-16  6:40 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2012-11-16  4:13 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, davem, cmetcalf, Simon Marchi

This patch simply makes the tilegx net driver call request_irq with a
non-null name. It makes the output in /proc/interrupts more obvious, but
also helps tools that don't expect to find null there.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
---
I am not sure if this patch will get picked up directly by David Miller
of it should go through Chris Metcalf's tree first. Hopefully it is
simple enough that it can get merged directly.

 drivers/net/ethernet/tile/tilegx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
index 4e98100..66e025a 100644
--- a/drivers/net/ethernet/tile/tilegx.c
+++ b/drivers/net/ethernet/tile/tilegx.c
@@ -917,7 +917,7 @@ static int tile_net_setup_interrupts(struct net_device *dev)
 	ingress_irq = rc;
 	tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU);
 	rc = request_irq(ingress_irq, tile_net_handle_ingress_irq,
-			 0, NULL, NULL);
+			 0, "tile_net", NULL);
 	if (rc != 0) {
 		netdev_err(dev, "request_irq failed: %d\n", rc);
 		destroy_irq(ingress_irq);
-- 
1.7.1


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

end of thread, other threads:[~2012-11-16  6:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-13 20:58 [PATCH] tilegx: request_irq with a non-null device name Simon Marchi
2012-11-13 21:37 ` Chris Metcalf
2012-11-13 21:50   ` Stephen Hemminger
2012-11-13 21:54   ` Simon Marchi
2012-11-13 21:59     ` Chris Metcalf
2012-11-16  4:13 Simon Marchi
2012-11-16  6:40 ` David Miller

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.