mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 17/19] drivers/pci: use for_each_pci_dev()
@ 2010-07-03 16:04 Kulikov Vasiliy
  2010-07-30 16:48 ` Jesse Barnes
  0 siblings, 1 reply; 2+ messages in thread
From: Kulikov Vasiliy @ 2010-07-03 16:04 UTC (permalink / raw)
  To: Kernel Janitors; +Cc: Jesse Barnes, linux-pci, linux-kernel

Use for_each_pci_dev() to simplify the code.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 drivers/pci/setup-irq.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c
index aa795fd..eec9738 100644
--- a/drivers/pci/setup-irq.c
+++ b/drivers/pci/setup-irq.c
@@ -59,7 +59,6 @@ pci_fixup_irqs(u8 (*swizzle)(struct pci_dev *, u8 *),
 	       int (*map_irq)(struct pci_dev *, u8, u8))
 {
 	struct pci_dev *dev = NULL;
-	while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+	for_each_pci_dev(dev)
 		pdev_fixup_irq(dev, swizzle, map_irq);
-	}
 }
-- 
1.7.0.4


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

* Re: [PATCH 17/19] drivers/pci: use for_each_pci_dev()
  2010-07-03 16:04 [PATCH 17/19] drivers/pci: use for_each_pci_dev() Kulikov Vasiliy
@ 2010-07-30 16:48 ` Jesse Barnes
  0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2010-07-30 16:48 UTC (permalink / raw)
  To: Kulikov Vasiliy; +Cc: Kernel Janitors, linux-pci, linux-kernel

On Sat,  3 Jul 2010 20:04:39 +0400
Kulikov Vasiliy <segooon@gmail.com> wrote:

> Use for_each_pci_dev() to simplify the code.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  drivers/pci/setup-irq.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c
> index aa795fd..eec9738 100644
> --- a/drivers/pci/setup-irq.c
> +++ b/drivers/pci/setup-irq.c
> @@ -59,7 +59,6 @@ pci_fixup_irqs(u8 (*swizzle)(struct pci_dev *, u8 *),
>  	       int (*map_irq)(struct pci_dev *, u8, u8))
>  {
>  	struct pci_dev *dev = NULL;
> -	while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
> +	for_each_pci_dev(dev)
>  		pdev_fixup_irq(dev, swizzle, map_irq);
> -	}
>  }

Applied all of these to my linux-next branch.  I squashed all the PCI
ones into a single commit, keeping only the x86 one separate.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

end of thread, other threads:[~2010-07-30 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-03 16:04 [PATCH 17/19] drivers/pci: use for_each_pci_dev() Kulikov Vasiliy
2010-07-30 16:48 ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome