Skip to content

Commit 3a3d208

Browse files
Lorenzo Pieralisictmarinas
authored andcommitted
ACPI/IORT: Remove useless PCI bus walk
The PCI bus domain number (used in the iort_match_node_callback() - pci_domain_nr() call) is cascaded through the PCI bus hierarchy at PCI bus enumeration time, therefore there is no need in iort_find_dev_node() to walk the PCI bus upwards to grab the root bus to be passed to iort_scan_node(), the device->bus PCI bus pointer will do. Remove this useless code. Signed-off-by: Lorenzo Pieralisi <[email protected]> Cc: Will Deacon <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Sudeep Holla <[email protected]> Cc: Robin Murphy <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 39c3cf5 commit 3a3d208

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/acpi/arm64/iort.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,7 @@ static struct acpi_iort_node *iort_find_dev_node(struct device *dev)
558558
iort_match_node_callback, dev);
559559
}
560560

561-
/* Find a PCI root bus */
562561
pbus = to_pci_dev(dev)->bus;
563-
while (!pci_is_root_bus(pbus))
564-
pbus = pbus->parent;
565562

566563
return iort_scan_node(ACPI_IORT_NODE_PCI_ROOT_COMPLEX,
567564
iort_match_node_callback, &pbus->dev);

0 commit comments

Comments
 (0)