aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2019-06-24 11:57:33 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2019-06-24 14:03:57 +1000
commita29e01b2c80599f495fb0ae7337163a641d348c1 (patch)
tree81a458758a4ed26d582dea423011a83b61a2582d
parent7fd6ca00dfed7a762574c82172129c9ec5927878 (diff)
downloadpci-a29e01b2c80599f495fb0ae7337163a641d348c1.tar.gz
PCI: Remove unused pci_bus_claim_resources
It's just two lines, open code it into the only user pci_host_resource_survey() and get rid of it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--drivers/pci/setup-bus.c13
-rw-r--r--include/linux/pci.h1
2 files changed, 4 insertions, 10 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 8b35271edc11ca..e12ab447e66ece 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1453,13 +1453,6 @@ static void pci_bus_allocate_resources(struct pci_bus *b)
pci_bus_allocate_resources(child);
}
-void pci_bus_claim_resources(struct pci_bus *b)
-{
- pci_bus_allocate_resources(b);
- pci_bus_allocate_dev_resources(b);
-}
-EXPORT_SYMBOL(pci_bus_claim_resources);
-
static void __pci_bridge_assign_resources(const struct pci_dev *bridge,
struct list_head *add_head,
struct list_head *fail_head)
@@ -2189,8 +2182,10 @@ void pci_host_resource_survey(struct pci_bus *bus)
down_read(&pci_bus_sem);
/* Claim existing resources if required */
- if (host->rsrc_policy <= pci_rsrc_claim_assign)
- pci_bus_claim_resources(bus);
+ if (host->rsrc_policy <= pci_rsrc_claim_assign) {
+ pci_bus_allocate_resources(bus);
+ pci_bus_allocate_dev_resources(bus);
+ }
/* If we do any kind of assignment, do it now */
if (host->rsrc_policy >= pci_rsrc_claim_assign_restricted) {
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 7eefaa0568309c..8e17d492f2a878 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1266,7 +1266,6 @@ int pci_set_vpd_size(struct pci_dev *dev, size_t len);
/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx);
void pci_bus_assign_resources(const struct pci_bus *bus);
-void pci_bus_claim_resources(struct pci_bus *bus);
void pci_bus_size_bridges(struct pci_bus *bus);
/* Architecture can override this (weak) */
bool pcibios_claim_zero_resource(struct pci_dev *dev, int rsrc_idx);