On Thu, 28 Feb 2019 15:49:27 +0000 Raslan Darawsheh <[email protected]> wrote:
>
> /* sdev: (struct sub_device *) */
> #define ETH(sdev) \
> - ((sdev)->edev)
> + (sdev->data == NULL ? NULL : &rte_eth_devices[sdev->data->port_id])
Macro arguments should always be parenthesised and you can shorten
by using abbreviated trigraph.
#define ETH(sdev) \
((sdev)->data ? &rte_eth_devices[(sdev)->data->port_id] : )

