On Mon, Apr 8, 2019 at 1:23 PM Gagandeep Singh <g.si...@nxp.com> wrote:
> +static > +int enetc_stats_get(struct rte_eth_dev *dev, > + struct rte_eth_stats *stats) > +{ > + struct enetc_eth_hw *hw = > + ENETC_DEV_PRIVATE_TO_HW(dev->data->dev_private); > + struct enetc_hw *enetc_hw = &hw->hw; > + > + if (stats == NULL) > + return -1; > + > + memset(stats, 0, sizeof(struct rte_eth_stats)); > Both the check and the memset are unneeded. https://git.dpdk.org/dpdk/tree/lib/librte_ethdev/rte_ethdev.c?h=v19.05-rc1#n1969 -- David Marchand