Re: [PATCH v3 1/2] PCI: Take other bus devices into account when distributing resources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 02, 2022 at 05:45:13PM +0000, Jonathan Cameron wrote:
> On Wed, 30 Nov 2022 13:22:20 +0200
> Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> wrote:

> >  	if (hotplug_bridges + normal_bridges == 1) {
> > -		dev = list_first_entry(&bus->devices, struct pci_dev, bus_list);
> > -		if (dev->subordinate)
> > -			pci_bus_distribute_available_resources(dev->subordinate,
> > -				add_list, io, mmio, mmio_pref);
> > +		bridge = NULL;
> > +
> > +		/* Find the single bridge on this bus first */
> 
> > +		for_each_pci_bridge(dev, bus) {
> 
> We could cache this a few lines up where we calculate the
> number of bridges. Perhaps not worth bothering though other
> than it letting you get rid of the WARN_ON_ONCE. 

Sorry for repeating this; I saw your response, but it didn't sink in
before I responded.

Bjorn



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux