From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=bfqvqrlGINL0d2GEJJNlrAK0RwYUDOBZSHAiw/n51HQ=; b=LPTwRFE66u/ECFDZr/Ly7TcT1ZQKYv7q+JFejEcilTHMVA1JbB8VPUpWigq3LGIgMB Go1oEO4Dtiv8ATjAiiVqiIAFM3isHdZhawkcHerhwHhqQ3+yPutQ2GiirmELW8BCccUM 6edbL3xA46hwZbLoe5A3cA76mb02rk014wRZ38OZXabUs2kQDF+0naEITM/lo4SgqVuc OLwBsbCu8YVmd+kWR5c9Xn0GD42CD5GRH7WqH18fmHCMHMmEmyGokI2ZTUXdx0wTf905 fcZ5GyCwq65Z/3zUP3ZJY1ngjNOAYSmXmWSvSZaW2mMtlWFDYFK4MeiXG/GNVvckEq4v teqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=bfqvqrlGINL0d2GEJJNlrAK0RwYUDOBZSHAiw/n51HQ=; b=ZqbfBePPUxcILmAmVjnoev4Llx2KAeUidE9VgmU0WorJHpfea1b+lB/KcY+7WOjgcw AkPWQtKTzTJx+G/Pdafzaflb/qWfO3OkqT/GkZ11zXQS3mXgVg9N7GNki+dvT2nlrC7E 7OQQnJoNHFvi0cRMcAAiLwAJbDRjYxB8G8OlLbZ1dypaydxmaKTq/TMYeXIZrmVIqSIN gw7MsuFuZBwzye4wr+RWqzEiyLuXwaFX/fW+/gitDN5TN1BYBz95q7dupHNJszThygjH ODaNvP47Z9r0pIniFpyweel4gaxExy3vaI5Cp52qO5g5y1IGBT7e6QEip9dQq5LDPni6 3ytA== X-Gm-Message-State: ALoCoQle0IMV2m1ECEiN3xC3vvhfpJ8RF+Emv3q1XsbJMi3mpYnJHY9JxevU8aDK+m1pwUpg/jgWWjlHJu1dc/z2jCC948LzoQ== X-Received: by 10.194.83.136 with SMTP id q8mr43469361wjy.51.1453401830837; Thu, 21 Jan 2016 10:43:50 -0800 (PST) Received: from xps13.localnet (165.16.90.92.rev.sfr.net. [92.90.16.165]) by smtp.gmail.com with ESMTPSA id ql10sm2624201wjc.23.2016.01.21.10.43.49 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jan 2016 10:43:49 -0800 (PST) From: Thomas Monjalon To: David Marchand Date: Thu, 21 Jan 2016 19:42:48 +0100 Message-ID: <1701908.3Qo6PKQGCI@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1453377431-25850-3-git-send-email-david.marchand@6wind.com> <20160121163836.0bcd405e@pcviktorin.fit.vutbr.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org, Jan Viktorin Subject: Re: [dpdk-dev] [dpdk-dev, 2/2] ethdev: move code to common place in hotplug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2016 18:43:51 -0000 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.