This list should not be used by drivers.
Use the public API instead.

Signed-off-by: Gaetan Rivet <gaetan.ri...@6wind.com>
Acked-by: Thomas Monjalon <tho...@monjalon.net>
---
 drivers/bus/pci/Makefile     | 1 +
 drivers/bus/pci/pci_common.c | 6 +-----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/pci/Makefile b/drivers/bus/pci/Makefile
index 804a198d1..c03722c13 100644
--- a/drivers/bus/pci/Makefile
+++ b/drivers/bus/pci/Makefile
@@ -37,6 +37,7 @@ EXPORT_MAP := rte_bus_pci_version.map
 
 CFLAGS := -I$(SRCDIR) $(CFLAGS)
 CFLAGS += -O3 $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),)
 SYSTEM := linux
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 2a00f365a..6bed0bc9d 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -45,12 +45,8 @@ static struct rte_devargs *pci_devargs_lookup(struct 
rte_pci_device *dev)
 {
        struct rte_devargs *devargs;
        struct rte_pci_addr addr;
-       struct rte_bus *pbus;
 
-       pbus = rte_bus_find_by_name("pci");
-       TAILQ_FOREACH(devargs, &devargs_list, next) {
-               if (devargs->bus != pbus)
-                       continue;
+       RTE_EAL_DEVARGS_FOREACH("pci", devargs) {
                devargs->bus->parse(devargs->name, &addr);
                if (!rte_pci_addr_cmp(&dev->addr, &addr))
                        return devargs;
-- 
2.11.0

Reply via email to