net/bonding: use non deprecated PCI API
authorDavid Marchand <david.marchand@redhat.com>
Fri, 25 Oct 2019 13:56:04 +0000 (15:56 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Sun, 27 Oct 2019 09:40:01 +0000 (10:40 +0100)
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 <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
drivers/net/bonding/rte_eth_bond_args.c

index f298ea0..bfe03c3 100644 (file)
@@ -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);
 }
 
 /**