From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 4ED6A5589 for ; Tue, 15 Mar 2016 07:29:47 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id l68so137396393wml.0 for ; Mon, 14 Mar 2016 23:29:47 -0700 (PDT) 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:in-reply-to:references; bh=bURukVxfkDcHW7o7YcYR7QhL0/M1d20SXEtk01c+JJg=; b=AyvlepBnPN0Rbh+WP9fL5dZ0V4BLmVbvIWL2alQUiye1um/xyxjCf+4USh9mS1dPRZ uOrdMURoNL8sCobwowMWoRPgVcJ/wbV8jnu2/4TQRQbsS1FKx3qFMUtPAtVV849BeR8Y BK6RUlzEBplJ3+stq8uD1TbsNng5AiJDMCGsa4qobjSKVzdtK8C5rZPz2ldLJxdDQIQW bau6phKyUWy0CL0xUcSULpanDgLGajqf8FlyxDlKahGOo8O6kCErQwWW7vUFD3K7AQC4 AQ/rk8Ip1FHwJNq+G7wpGdIjkIpBVFIFn7L74I2+bOVryMOKfkfWZb4yjWhcJO1nqU/I k2xw== 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:in-reply-to :references; bh=bURukVxfkDcHW7o7YcYR7QhL0/M1d20SXEtk01c+JJg=; b=KWO6n1S0GMk1RO9YEkwAY/tfDsSlpYHhnU/GVcJZCRQPCxRe0BLViUq8Yr4U1QwTU9 3LbaZE4QJBcn216mSs4R+BsIkf/jFn97QFRcA77kvsS+vr5C2sZrtQcRZphKZ/ywC0RP UsmcfrhsiBPrB5ddZx2rWab8/scxdJDZSR/nAipdy1AYEjEmyuCfWGjBTCb+8wZjJ+8u Mu+srIR6LBAofFlByxbu9lLKUw7hLol2MU7+Wfe+eTL1k37AYTV9aAL1oPTb7/EXtFe3 nEKLJxGJIJK1pq+8vUhy8B359mwU2aGr58TG++OhrB0QGiFAcKdgKRbFQuHUkwW3tXJM cGCQ== X-Gm-Message-State: AD7BkJIlqnC/HhvMWFjjOMHSk3vd7hcLSjKc9rmIjecNQMuIyGvxsLhVkPRPgsitVvPJSYnS X-Received: by 10.28.23.75 with SMTP id 72mr22451397wmx.50.1458023387222; Mon, 14 Mar 2016 23:29:47 -0700 (PDT) Received: from gloops.dev.6wind.com ([37.163.72.253]) by smtp.gmail.com with ESMTPSA id up6sm25417399wjc.6.2016.03.14.23.29.45 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2016 23:29:46 -0700 (PDT) From: David Marchand To: dev@dpdk.org Cc: mauricio.vasquezbernal@studenti.polito.it, yuanhan.liu@linux.intel.com, huawei.xie@intel.com Date: Tue, 15 Mar 2016 07:29:11 +0100 Message-Id: <1458023353-22268-3-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458023353-22268-1-git-send-email-david.marchand@6wind.com> References: <1458023353-22268-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH 2/4] pci: align ioport unmap error handling to ioport map 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: Tue, 15 Mar 2016 06:29:47 -0000 Same idea as commit bd80d4730aca ("pci: rework ioport map error handling"). Signed-off-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index e2af371..7707292 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -690,12 +690,11 @@ rte_eal_pci_ioport_write(struct rte_pci_ioport *p, int rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) { - int ret; + int ret = -1; switch (p->dev->kdrv) { #ifdef VFIO_PRESENT case RTE_KDRV_VFIO: - ret = -1; if (pci_vfio_is_enabled()) ret = pci_vfio_ioport_unmap(p); break; @@ -710,8 +709,6 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) #if defined(RTE_ARCH_X86) /* special case for x86 ... nothing to do */ ret = 0; -#else - ret = -1; #endif break; } -- 1.9.1