netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/19] drivers/net/irda: use for_each_pci_dev()
@ 2010-07-03 16:04 Kulikov Vasiliy
  2010-07-20 15:33 ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Kulikov Vasiliy @ 2010-07-03 16:04 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Samuel Ortiz, David S. Miller, Stephen Hemminger, Jiri Kosina,
	Joe Perches, Eric Dumazet, netdev, linux-kernel

Use for_each_pci_dev() to simplify the code.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 drivers/net/irda/smsc-ircc2.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index d67e484..850ca1c 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -2848,9 +2848,7 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
 	unsigned short ss_device = 0x0000;
 	int ret = 0;
 
-	dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
-
-	while (dev != NULL) {
+	for_each_pci_dev(dev) {
 		struct smsc_ircc_subsystem_configuration *conf;
 
 		/*
@@ -2899,7 +2897,6 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
 					ret = -ENODEV;
 			}
 		}
-		dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
 	}
 
 	return ret;
-- 
1.7.0.4

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

* Re: [PATCH 11/19] drivers/net/irda: use for_each_pci_dev()
  2010-07-03 16:04 [PATCH 11/19] drivers/net/irda: use for_each_pci_dev() Kulikov Vasiliy
@ 2010-07-20 15:33 ` Jiri Kosina
  2010-07-21 21:04   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Kosina @ 2010-07-20 15:33 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: Kernel Janitors, Samuel Ortiz, David S. Miller, Stephen Hemminger,
	Joe Perches, Eric Dumazet, netdev, linux-kernel

On Sat, 3 Jul 2010, Kulikov Vasiliy wrote:

> Use for_each_pci_dev() to simplify the code.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  drivers/net/irda/smsc-ircc2.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
> index d67e484..850ca1c 100644
> --- a/drivers/net/irda/smsc-ircc2.c
> +++ b/drivers/net/irda/smsc-ircc2.c
> @@ -2848,9 +2848,7 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
>  	unsigned short ss_device = 0x0000;
>  	int ret = 0;
>  
> -	dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
> -
> -	while (dev != NULL) {
> +	for_each_pci_dev(dev) {
>  		struct smsc_ircc_subsystem_configuration *conf;
>  
>  		/*
> @@ -2899,7 +2897,6 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
>  					ret = -ENODEV;
>  			}
>  		}
> -		dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
>  	}
>  
>  	return ret;

Doesn't seem to hit linux-next as of today. Dave, are you going to merge 
it?

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

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

* Re: [PATCH 11/19] drivers/net/irda: use for_each_pci_dev()
  2010-07-20 15:33 ` Jiri Kosina
@ 2010-07-21 21:04   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-07-21 21:04 UTC (permalink / raw)
  To: jkosina
  Cc: segooon, kernel-janitors, samuel, shemminger, joe, eric.dumazet,
	netdev, linux-kernel

From: Jiri Kosina <jkosina@suse.cz>
Date: Tue, 20 Jul 2010 17:33:01 +0200 (CEST)

> On Sat, 3 Jul 2010, Kulikov Vasiliy wrote:
> 
>> Use for_each_pci_dev() to simplify the code.
>> 
>> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
>> ---
...
> Doesn't seem to hit linux-next as of today. Dave, are you going to merge 
> it?

I'll apply this now, thanks.

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

end of thread, other threads:[~2010-07-21 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-03 16:04 [PATCH 11/19] drivers/net/irda: use for_each_pci_dev() Kulikov Vasiliy
2010-07-20 15:33 ` Jiri Kosina
2010-07-21 21:04   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).