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

Thomas Monjalon thomas at monjalon.net
Tue Apr 9 22:14:08 CEST 2019


09/04/2019 21:06, Vivian Kong:
> Signed-off-by: Vivian Kong <vivkong at ca.ibm.com>
> ---
>  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;

Why do we need such cast?




More information about the dev mailing list