From ce77e6bf5113650e6d026e0b7fb395b60ab1f363 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Fri, 25 Oct 2019 15:56:04 +0200 Subject: [PATCH] net/bonding: use non deprecated PCI API rte_eal_compare_pci_addr has been deprecated since v17.11. Convert to rte_pci_addr_cmp. Fixes: c848b518bbc7 ("net/bonding: support bifurcated driver in eal") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Thomas Monjalon --- drivers/net/bonding/rte_eth_bond_args.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c index f298ea0e17..bfe03c3d06 100644 --- a/drivers/net/bonding/rte_eth_bond_args.c +++ b/drivers/net/bonding/rte_eth_bond_args.c @@ -60,11 +60,10 @@ find_port_id_by_dev_name(const char *name) static inline int bond_pci_addr_cmp(const struct rte_device *dev, const void *_pci_addr) { - struct rte_pci_device *pdev; + const struct rte_pci_device *pdev = RTE_DEV_TO_PCI_CONST(dev); const struct rte_pci_addr *paddr = _pci_addr; - pdev = RTE_DEV_TO_PCI(*(struct rte_device **)(void *)&dev); - return rte_eal_compare_pci_addr(&pdev->addr, paddr); + return rte_pci_addr_cmp(&pdev->addr, paddr); } /** -- 2.20.1