All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] pcmcia: convert to use for_each_pci_bridge() helper
@ 2017-10-13 16:53 Andy Shevchenko
  2017-10-20 21:45 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2017-10-13 16:53 UTC (permalink / raw)
  To: linux-pcmcia, Bjorn Helgaas, linux-pci; +Cc: Andy Shevchenko

...which makes code slightly cleaner.

Requires: d43f59ce6c50 ("PCI: Add for_each_pci_bridge() helper")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pcmcia/cardbus.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
index 4fe4cc4ae19a..5c0170597037 100644
--- a/drivers/pcmcia/cardbus.c
+++ b/drivers/pcmcia/cardbus.c
@@ -77,9 +77,8 @@ int __ref cb_alloc(struct pcmcia_socket *s)
 
 	max = bus->busn_res.start;
 	for (pass = 0; pass < 2; pass++)
-		list_for_each_entry(dev, &bus->devices, bus_list)
-			if (pci_is_bridge(dev))
-				max = pci_scan_bridge(bus, dev, max, pass);
+		for_each_pci_bridge(dev, bus)
+			max = pci_scan_bridge(bus, dev, max, pass);
 
 	/*
 	 * Size all resources below the CardBus controller.
-- 
2.14.2

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

* Re: [PATCH v1] pcmcia: convert to use for_each_pci_bridge() helper
  2017-10-13 16:53 [PATCH v1] pcmcia: convert to use for_each_pci_bridge() helper Andy Shevchenko
@ 2017-10-20 21:45 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2017-10-20 21:45 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-pcmcia, Bjorn Helgaas, linux-pci

On Fri, Oct 13, 2017 at 07:53:52PM +0300, Andy Shevchenko wrote:
> ...which makes code slightly cleaner.
> 
> Requires: d43f59ce6c50 ("PCI: Add for_each_pci_bridge() helper")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

I folded this into the original commit, since it hasn't been merged
anywhere.  Note that I moved that commit from pci/misc to pci/hotplug
since Mika's series depends on it.  Thanks!

> ---
>  drivers/pcmcia/cardbus.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
> index 4fe4cc4ae19a..5c0170597037 100644
> --- a/drivers/pcmcia/cardbus.c
> +++ b/drivers/pcmcia/cardbus.c
> @@ -77,9 +77,8 @@ int __ref cb_alloc(struct pcmcia_socket *s)
>  
>  	max = bus->busn_res.start;
>  	for (pass = 0; pass < 2; pass++)
> -		list_for_each_entry(dev, &bus->devices, bus_list)
> -			if (pci_is_bridge(dev))
> -				max = pci_scan_bridge(bus, dev, max, pass);
> +		for_each_pci_bridge(dev, bus)
> +			max = pci_scan_bridge(bus, dev, max, pass);
>  
>  	/*
>  	 * Size all resources below the CardBus controller.
> -- 
> 2.14.2
> 

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

end of thread, other threads:[~2017-10-20 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-13 16:53 [PATCH v1] pcmcia: convert to use for_each_pci_bridge() helper Andy Shevchenko
2017-10-20 21:45 ` Bjorn Helgaas

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.