From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [dpdk-dev, 2/2] ethdev: move code to common place in hotplug Date: Thu, 21 Jan 2016 19:42:48 +0100 Message-ID: <1701908.3Qo6PKQGCI@xps13> References: <1453377431-25850-3-git-send-email-david.marchand@6wind.com> <20160121163836.0bcd405e@pcviktorin.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Jan Viktorin To: David Marchand Return-path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 1D156E62 for ; Thu, 21 Jan 2016 19:43:51 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id 123so186229401wmz.0 for ; Thu, 21 Jan 2016 10:43:51 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-01-21 19:06, David Marchand: > On Thu, Jan 21, 2016 at 4:38 PM, Jan Viktorin wrote: > > On Thu, 21 Jan 2016 12:57:11 +0100 > > David Marchand wrote: > > > [snip] > >> @@ -612,14 +599,25 @@ int > >> rte_eth_dev_attach(const char *devargs, uint8_t *port_id) > >> { > >> struct rte_pci_addr addr; > >> + int ret = -1; > >> > >> if ((devargs == NULL) || (port_id == NULL)) > >> - return -EINVAL; > >> + goto err; > > > > This change modifies the return value from -EINVAL to -1. I don't know > > whether is this an issue but it looks suspicious. > > Should not be an issue, as the api does not give details on expected > negative return values. > Just noticed, this also introduces a new log message that was not > displayed before. > > To be safe, I suppose I should restore this. > > Thomas, opinion ? I'm OK with the log message added for this error case. I would just keep the -EINVAL return value. Other nit: you are allowed to fix the (moved) log message.