Re: [PATCH v5 3/7] PCI: Use pci_walk_bus to detect unassigned resources

2013-06-26 Thread Yinghai Lu
On Tue, Jun 25, 2013 at 2:46 PM, Bjorn Helgaas wrote: > On Tue, Jun 25, 2013 at 3:38 PM, Benjamin Herrenschmidt > wrote: >> On Tue, 2013-06-25 at 15:15 -0600, Bjorn Helgaas wrote: >>> - for_each_pci_dev(dev) { >>> > - int i; >>> > + /* Not assigned, or rejected by kern

Re: [PATCH v5 3/7] PCI: Use pci_walk_bus to detect unassigned resources

2013-06-26 Thread Yinghai Lu
On Tue, Jun 25, 2013 at 2:15 PM, Bjorn Helgaas wrote: >> +static int __init check_unassigned_resources(struct pci_dev *dev, void >> *data) > > I'm not going to add a function named "check_*()" because the name gives no > clue about what the return value means. If it's a boolean function, the > n

Re: [PATCH v5 3/7] PCI: Use pci_walk_bus to detect unassigned resources

2013-06-25 Thread Bjorn Helgaas
On Tue, Jun 25, 2013 at 3:38 PM, Benjamin Herrenschmidt wrote: > On Tue, 2013-06-25 at 15:15 -0600, Bjorn Helgaas wrote: >> - for_each_pci_dev(dev) { >> > - int i; >> > + /* Not assigned, or rejected by kernel ? */ >> > + if (r->flags && !r->start) { >> > +

Re: [PATCH v5 3/7] PCI: Use pci_walk_bus to detect unassigned resources

2013-06-25 Thread Benjamin Herrenschmidt
On Tue, 2013-06-25 at 15:15 -0600, Bjorn Helgaas wrote: > - for_each_pci_dev(dev) { > > - int i; > > + /* Not assigned, or rejected by kernel ? */ > > + if (r->flags && !r->start) { > > + (*unassigned)++; > > + return 1

Re: [PATCH v5 3/7] PCI: Use pci_walk_bus to detect unassigned resources

2013-06-25 Thread Bjorn Helgaas
On Fri, May 31, 2013 at 11:03:08PM -0700, Yinghai Lu wrote: > Per Bjorn, use pci_walk_bus instead of for_each_pci_dev or > calling pci_realloc_detect() recursively, that will make code more readable. > > Per Bjorn, separate it from big patch that handing assign_unssigned per root > bus. > > Sign

[PATCH v5 3/7] PCI: Use pci_walk_bus to detect unassigned resources

2013-05-31 Thread Yinghai Lu
Per Bjorn, use pci_walk_bus instead of for_each_pci_dev or calling pci_realloc_detect() recursively, that will make code more readable. Per Bjorn, separate it from big patch that handing assign_unssigned per root bus. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 46 ++