From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 8F2EDA046B
	for <public@inbox.dpdk.org>; Sat, 29 Jun 2019 21:30:21 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 1E29237B4;
	Sat, 29 Jun 2019 21:30:20 +0200 (CEST)
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com
 [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id A976B37A8;
 Sat, 29 Jun 2019 21:30:18 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id DBD222148D;
 Sat, 29 Jun 2019 15:30:17 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Sat, 29 Jun 2019 15:30:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=mesmtp;
 bh=EXx4yFwScAt28w4HPNfOuSkNAHKwJMoVGNWSbyCmhtY=; b=R78nF0016D+o
 WhBGAcYKEiZiPb0WMMM0/XaGTFawCA2u+Vs/rhxFOz3M4d5CHc+Sh7IKN788193u
 6wVc7x3daAxn016lI3DaAiTLXO3bUW8vPsa8uY78pnYf3XY53YkzfZ5ZFWDWC9Sm
 5bOn2MgO+NRBGSsYo5DwDkl57XaWSkQ=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm3; bh=EXx4yFwScAt28w4HPNfOuSkNAHKwJMoVGNWSbyCmh
 tY=; b=aw3DPSE1QTjRkU57fylat57ugyiKu4jkLGDBPEVpN0WjnHCfbVxtHd4g2
 X+nehZN+L8AXYeaWstmuOrOZFQzwfbDfNnP7GfSHClUw02kZ3Oq55bs8azTb0US5
 VACL+AKk4A9e8OSW7LzwImB9Mplb+cDBPR8d7/PJZW7dJ2wnUzzBDRZ+mHbeVftv
 mM9lin4lwMSR+JsYjp1DaksA8eNOORYXduof3yH9BAmxPy10f7d2buE3la/t9lg5
 ORFqlRQCRABrhFkT3ld5oGTP/UKtzWCLdJ/gGQShJsPqGjYjRPMSWwsEPf91xsWX
 0K8P61gauOt0nWoRyefOxU8iKCU2A==
X-ME-Sender: <xms:SLwXXWkES4oLQZcic728TCjFyEi6qoYZwniZ0bwRxL9G5CIBdw3c5Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrvddvgddufeelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf
 hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh
 ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:SLwXXSEs2AeuLkdjcaU6exgeFRO2TFyW0SsFsnQ6SzQoTSRU8S4Y7w>
 <xmx:SLwXXfpcx5wk4Bxmwe44x5qEcR6gnftYUjjiyxRrh51KdvwdK-4cYw>
 <xmx:SLwXXe474m9w3ap8pZBTyyxpDKlaUv2t_KuD62DVE8InEfh1KaIK_g>
 <xmx:SbwXXa8H8MFmSUVrVFN7z5mHluygBArm_3HLPrTHDA0PwIMFE2dJBQ>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 5CF02380076;
 Sat, 29 Jun 2019 15:30:15 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Ilya Maximets <i.maximets@samsung.com>
Cc: dev@dpdk.org, David Marchand <david.marchand@redhat.com>,
 Anatoly Burakov <anatoly.burakov@intel.com>,
 Jan Blunck <jblunck@infradead.org>, Qi Zhang <qi.z.zhang@intel.com>,
 Kevin Traynor <ktraynor@redhat.com>, dpdk stable <stable@dpdk.org>,
 Gaetan Rivet <gaetan.rivet@6wind.com>
Date: Sat, 29 Jun 2019 21:30:14 +0200
Message-ID: <2035115.EgepBik12h@xps>
In-Reply-To: <CAJFAV8ygt3nQE6Jg0YAeHE+paqLfJ2=8ULg1ksMXM83wv5BD=g@mail.gmail.com>
References: <CGME20190606100234eucas1p2a73029a37495cde21bce3b9a3b023ac4@eucas1p2.samsung.com>
 <20190606100228.19959-1-i.maximets@samsung.com>
 <CAJFAV8ygt3nQE6Jg0YAeHE+paqLfJ2=8ULg1ksMXM83wv5BD=g@mail.gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v2] eal: fix positive error codes from
	probe/remove
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

07/06/2019 10:32, David Marchand:
> On Thu, Jun 6, 2019 at 12:03 PM Ilya Maximets <i.maximets@samsung.com>
> wrote:
> 
> > According to API, 'rte_dev_probe()' and 'rte_dev_remove()' must
> > return 0 or negative error code. Bus code returns positive values
> > if device wasn't recognized by any driver, so the result of
> > 'bus->plug/unplug()' must be converted. 'local_dev_probe()' and
> > 'local_dev_remove()' also has their internal API, so the conversion
> > should be done there.
> >
> > Positive on remove means that device not found by driver.
> >
> 
> For backports, it is safer to add the check on > 0.
> The patch looks good to me.
> 
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks