[dpdk-dev] [PATCH] ethdev: missing typecast from void in eth_dev_pci_specific_init

David Christensen drc at linux.vnet.ibm.com
Wed Apr 10 22:16:16 CEST 2019


The function eth_dev_pci_specific_init is missing a typecast to
(struct rte_pci_device *) for the input argument bus_device.

Cc: stable at dpdk.org

Signed-off-by: David Christensen <drc at linux.vnet.ibm.com>
Tested-by: Radhika Chirra <radhika.chirra at 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 23257e9..a325311 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -72,7 +72,7 @@
 
 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;
-- 
1.8.3.1



More information about the dev mailing list