diff options
author | Yinghai Lu <yinghai@kernel.org> | 2013-07-22 23:37:12 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-07-25 20:35:02 +0200 |
commit | 61e83cdde15f8850087d6c57c8576e25b671db59 (patch) | |
tree | 8367eddd294c34bcb59b5215091f3c40b631ed32 /drivers/pci/setup-bus.c | |
parent | Linux 3.11-rc2 (diff) | |
download | linux-61e83cdde15f8850087d6c57c8576e25b671db59.tar.xz linux-61e83cdde15f8850087d6c57c8576e25b671db59.zip |
PCI: Drop temporary variable in pci_assign_unassigned_resources()
Drop the "bus" temporary variable. No functional change, but simplifies
later patch slightly.
[bhelgaas: changelog, make same change in
pci_assign_unassigned_bridge_resources() to keep it parallel with
pci_assign_unassigned_resources()]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r-- | drivers/pci/setup-bus.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index d254e2379533..cb6bcbb26226 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -1458,12 +1458,11 @@ again: * Try to release leaf bridge's resources that doesn't fit resource of * child device under that bridge */ - list_for_each_entry(fail_res, &fail_head, list) { - bus = fail_res->dev->bus; - pci_bus_release_bridge_resources(bus, + list_for_each_entry(fail_res, &fail_head, list) + pci_bus_release_bridge_resources(fail_res->dev->bus, fail_res->flags & type_mask, rel_type); - } + /* restore size and flags */ list_for_each_entry(fail_res, &fail_head, list) { struct resource *res = fail_res->res; @@ -1522,13 +1521,11 @@ again: * Try to release leaf bridge's resources that doesn't fit resource of * child device under that bridge */ - list_for_each_entry(fail_res, &fail_head, list) { - struct pci_bus *bus = fail_res->dev->bus; - unsigned long flags = fail_res->flags; - - pci_bus_release_bridge_resources(bus, flags & type_mask, + list_for_each_entry(fail_res, &fail_head, list) + pci_bus_release_bridge_resources(fail_res->dev->bus, + fail_res->flags & type_mask, whole_subtree); - } + /* restore size and flags */ list_for_each_entry(fail_res, &fail_head, list) { struct resource *res = fail_res->res; |