On 3/2/2023 10:35 AM, Mingxia Liu wrote: > Add support for these device ops: > - dev_xstats_get > - dev_xstats_get_names > - dev_xstats_reset > > Signed-off-by: Mingxia Liu <mingxia....@intel.com>
<...> > +static int cpfl_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, > + struct rte_eth_xstat_name *xstats_names, > + __rte_unused unsigned int limit) > +{ > + unsigned int i; > + > + if (xstats_names) > + for (i = 0; i < CPFL_NB_XSTATS; i++) { > + snprintf(xstats_names[i].name, > + sizeof(xstats_names[i].name), > + "%s", rte_cpfl_stats_strings[i].name); > + } Although above is correct, can you please add {}, it is safer to do it for multi line blocks.