[dpdk-dev] [RFC 10/12] ethdev: add cast for bus_device

Vivian Kong vivkong at gmail.com
Tue Apr 9 21:06:28 CEST 2019


Signed-off-by: Vivian Kong <vivkong at ca.ibm.com>
---
 lib/librte_ethdev/rte_ethdev_pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
index 23257e986..80bd120b9 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -72,7 +72,7 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
 
 static inline int
 eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) {
-	struct rte_pci_device *pci_dev = bus_device;
+	struct rte_pci_device *pci_dev = (struct rte_pci_device *) bus_device;
 
 	if (!pci_dev)
 		return -ENODEV;
-- 
2.17.1



More information about the dev mailing list