From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49FE2C5B577 for ; Sat, 29 Jun 2019 19:30:22 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 5C19C215EA for ; Sat, 29 Jun 2019 19:30:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="R78nF001"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="aw3DPSE1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C19C215EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrvddvgddufeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: 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 To: Ilya Maximets Cc: dev@dpdk.org, David Marchand , Anatoly Burakov , Jan Blunck , Qi Zhang , Kevin Traynor , dpdk stable , Gaetan Rivet Date: Sat, 29 Jun 2019 21:30:14 +0200 Message-ID: <2035115.EgepBik12h@xps> In-Reply-To: References: <20190606100228.19959-1-i.maximets@samsung.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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 07/06/2019 10:32, David Marchand: > On Thu, Jun 6, 2019 at 12:03 PM Ilya Maximets > 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 Applied, thanks