From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 02A702E81 for ; Wed, 9 Mar 2016 08:27:47 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 08 Mar 2016 23:27:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,310,1455004800"; d="scan'208";a="905752420" Received: from dpdk15.sh.intel.com ([10.239.129.25]) by orsmga001.jf.intel.com with ESMTP; 08 Mar 2016 23:27:46 -0800 From: Huawei Xie To: dev@dpdk.org Date: Tue, 8 Mar 2016 23:33:41 +0800 Message-Id: <1457451223-82306-5-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1457451223-82306-1-git-send-email-huawei.xie@intel.com> References: <20151222035041.GA7532@pxdev.xzpeter.org> <1457451223-82306-1-git-send-email-huawei.xie@intel.com> Cc: nikita.troitsky@intel.com Subject: [dpdk-dev] [PATCH v5 4/6] eal: simple code rework 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: Wed, 09 Mar 2016 07:27:48 -0000 Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index dc0aa37..4ede4cb 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -685,12 +685,11 @@ int rte_eal_pci_ioport_map(struct rte_pci_device *dev, int bar, struct rte_pci_ioport *p) { - int ret; + int ret = -1; switch (dev->kdrv) { #ifdef VFIO_PRESENT case RTE_KDRV_VFIO: - ret = -1; if (pci_vfio_is_enabled()) ret = pci_vfio_ioport_map(dev, bar, p); break; @@ -701,10 +700,7 @@ rte_eal_pci_ioport_map(struct rte_pci_device *dev, int bar, break; default: #if defined(RTE_ARCH_X86) - /* special case for x86 ... */ ret = pci_ioport_map(dev, bar, p); -#else - ret = -1; #endif break; } -- 1.8.1.4