> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Tuesday, February 24, 2015 12:59 AM
> To: Zhou, Danny
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v5 1/6] ethdev: add rx interrupt 
> enable/disable functions
> 
> On Tue, 24 Feb 2015 00:55:37 +0800
> Zhou Danny <danny.zhou at intel.com> wrote:
> 
> > +int
> > +rte_eth_dev_rx_queue_intr_enable(uint8_t port_id,
> > +                           uint16_t queue_id)
> > +{
> > +   struct rte_eth_dev *dev;
> > +
> > +   if (port_id >= nb_ports) {
> > +           PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> > +           return (-ENODEV);
> 
> Please don't use the BSD style of extra useless paren's around
> returns.

This code snippet doing sanity check is copied from other functions defined in 
the same file 
lib/librte_ether/rte_ethdev.c, and there are plenty of legacy code in this file 
doing the similar
BSD style thing. I'd suggest somebody to clean all those kinds of BSD style 
code from DPDK code, 
in a separated patchset. 

Reply via email to