bus/pci: remove unused function to detach by address

The function rte_pci_detach() is private to PCI and is
not used anywhere in current code base. Remove dead code.

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
This commit is contained in:
Rami Rosen 2018-05-20 22:52:58 +03:00 committed by Thomas Monjalon
parent f3bac43b60
commit e690338a7b
2 changed files with 0 additions and 52 deletions

View File

@ -257,43 +257,6 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
return 1;
}
/*
* Detach device specified by its pci address.
*/
int
rte_pci_detach(const struct rte_pci_addr *addr)
{
struct rte_pci_device *dev = NULL;
int ret = 0;
if (addr == NULL)
return -1;
FOREACH_DEVICE_ON_PCIBUS(dev) {
if (rte_pci_addr_cmp(&dev->addr, addr))
continue;
ret = rte_pci_detach_dev(dev);
if (ret < 0)
/* negative value is an error */
goto err_return;
if (ret > 0)
/* positive value means driver doesn't support it */
continue;
rte_pci_remove_device(dev);
free(dev);
return 0;
}
return -1;
err_return:
RTE_LOG(WARNING, EAL, "Requested device " PCI_PRI_FMT
" cannot be used\n", dev->addr.domain, dev->addr.bus,
dev->addr.devid, dev->addr.function);
return -1;
}
/*
* Scan the content of the PCI bus, and call the probe() function for
* all registered drivers that have a matching entry in its id_table

View File

@ -32,21 +32,6 @@ rte_pci_probe(void);
*/
int rte_pci_scan(void);
/**
* Close the single PCI device.
*
* Scan the content of the PCI bus, and find the pci device specified by pci
* address, then call the remove() 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 close.
* @return
* - 0 on success.
* - Negative on error.
*/
int rte_pci_detach(const struct rte_pci_addr *addr);
/**
* Find the name of a PCI device.
*/