From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhou, Danny" Subject: Re: [PATCH v5 1/6] ethdev: add rx interrupt enable/disable functions Date: Mon, 23 Feb 2015 17:17:02 +0000 Message-ID: References: <1424710542-14637-1-git-send-email-danny.zhou@intel.com> <1424710542-14637-2-git-send-email-danny.zhou@intel.com> <20150223085918.0b9853a9@urahara> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Stephen Hemminger Return-path: In-Reply-To: <20150223085918.0b9853a9@urahara> Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > -----Original Message----- > From: Stephen Hemminger [mailto:stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org] > Sent: Tuesday, February 24, 2015 12:59 AM > To: Zhou, Danny > Cc: dev-VfR2kkLFssw@public.gmane.org > Subject: Re: [dpdk-dev] [PATCH v5 1/6] ethdev: add rx interrupt enable/di= sable functions >=20 > On Tue, 24 Feb 2015 00:55:37 +0800 > Zhou Danny wrote: >=20 > > +int > > +rte_eth_dev_rx_queue_intr_enable(uint8_t port_id, > > + uint16_t queue_id) > > +{ > > + struct rte_eth_dev *dev; > > + > > + if (port_id >=3D nb_ports) { > > + PMD_DEBUG_TRACE("Invalid port_id=3D%d\n", port_id); > > + return (-ENODEV); >=20 > 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=20 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,=20 in a separated patchset.=20