ethdev: fix cast for C++ compatibility

C++ does not allow implicit conversion to/from void*,
so we need an explicit cast to allow the driver SDK header
to be included from C++ code.

Fixes: e489007a41 ("ethdev: add generic create/destroy ethdev APIs")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
This commit is contained in:
Bruce Richardson 2022-02-15 17:30:27 +00:00 committed by Thomas Monjalon
parent a43e396951
commit 5ed2a2d4fd

View File

@ -50,8 +50,9 @@ 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;
eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device)
{
struct rte_pci_device *pci_dev = (struct rte_pci_device *)bus_device;
if (!pci_dev)
return -ENODEV;