From: Stephen Hemminger Date: Thu, 17 May 2018 23:44:58 +0000 (-0700) Subject: bus/pci: remove unused function to probe by address X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f3bac43b60da6ae78cbef50ecded8be1df62c472;p=dpdk.git bus/pci: remove unused function to probe by address The function rte_pci_probe_one is private to PCI and is not used anywhere in current code base. Remove dead code. Signed-off-by: Stephen Hemminger --- diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index d3ac04a8f0..8127f58166 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -257,44 +257,6 @@ pci_probe_all_drivers(struct rte_pci_device *dev) return 1; } -/* - * Find the pci device specified by pci address, then invoke probe function of - * the driver of the device. - */ -int -rte_pci_probe_one(const struct rte_pci_addr *addr) -{ - struct rte_pci_device *dev = NULL; - - int ret = 0; - - if (addr == NULL) - return -1; - - /* update current pci device in global list, kernel bindings might have - * changed since last time we looked at it. - */ - if (pci_update_device(addr) < 0) - goto err_return; - - FOREACH_DEVICE_ON_PCIBUS(dev) { - if (rte_pci_addr_cmp(&dev->addr, addr)) - continue; - - ret = pci_probe_all_drivers(dev); - if (ret) - goto err_return; - return 0; - } - return -1; - -err_return: - RTE_LOG(WARNING, EAL, - "Requested device " PCI_PRI_FMT " cannot be used\n", - addr->domain, addr->bus, addr->devid, addr->function); - return -1; -} - /* * Detach device specified by its pci address. */ diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h index 680879ed35..353a1aba0e 100644 --- a/drivers/bus/pci/private.h +++ b/drivers/bus/pci/private.h @@ -32,21 +32,6 @@ rte_pci_probe(void); */ int rte_pci_scan(void); -/** - * Probe the single PCI device. - * - * Scan the content of the PCI bus, and find the pci device specified by pci - * address, then call the probe() function for registered driver that has a - * matching entry in its id_table for discovered device. - * - * @param addr - * The PCI Bus-Device-Function address to probe. - * @return - * - 0 on success. - * - Negative on error. - */ -int rte_pci_probe_one(const struct rte_pci_addr *addr); - /** * Close the single PCI device. *