[PATCH v2 01/14] ethdev: remove unnecessary deref on function pointers

Stephen Hemminger stephen at networkplumber.org
Thu Feb 20 17:09:59 CET 2025


On Thu, 20 Feb 2025 10:09:23 +0300
Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru> wrote:

> On 2/20/25 05:32, Stephen Hemminger wrote:
> > The expression *dev->dev_ops->rx_queue_start and
> > dev->dev_ops->rx_queue_start are equivalent.
> > Remove the unnecessary asterisk and parenthesis.
> > 
> > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>  
> 
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> 
> one nit below
> 
> > @@ -6995,11 +6966,11 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id,
> >   		return -EINVAL;
> >   	}
> >   
> > -	if (*dev->dev_ops->ip_reassembly_capability_get == NULL)
> > +	if (dev->dev_ops->ip_reassembly_capability_get == NULL)
> >   		return -ENOTSUP;
> >   	memset(reassembly_capa, 0, sizeof(struct rte_eth_ip_reassembly_params));
> >   
> > -	ret = eth_err(port_id, (*dev->dev_ops->ip_reassembly_capability_get)
> > +	ret = eth_err(port_id, (dev->dev_ops->ip_reassembly_capability_get)  
> 
> Why are parenthesis kept above instead of moving to the next line and
> remove parenthesis as it is done in the rest of cases?
> 
> >   					(dev, reassembly_capa));

Thanks, will fix in next version.
The parens were not caught by the regex used to do global replace.


More information about the dev mailing list