[dpdk-dev] [RFC 10/12] ethdev: add cast for bus_device
Stephen Hemminger
stephen at networkplumber.org
Wed Apr 10 04:41:43 CEST 2019
On Tue, 09 Apr 2019 22:14:08 +0200
Thomas Monjalon <thomas at monjalon.net> wrote:
> 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?
>
>
I agree with Thomas, we try to avoid extra casts and there is even
a script to find them.
More information about the dev
mailing list