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 ED68291B4 for ; Fri, 22 Jan 2016 16:27:54 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id b14so137758434wmb.1 for ; Fri, 22 Jan 2016 07:27:54 -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:in-reply-to:references; bh=fLf2dOaVN3sw1SLqblcSHjmdDQB+0Yq0IqK9YpIj1dI=; b=0NyCB0YTuFc/Uf2pKBeU+6XWhdWOIv99r8wpuZtJepIDRizYD99V15GoVO8h4woSvI nmE3C/AgdCYfxjsMR5OOFgjPLbFqnWjZl5aCxMgozViKiH62/rg0UxN7ctJew6CdkUvj ghatyuCTCkvi0QrKleq79n1rV6mL3gRG1HIUBBhVFSDoE63zkEqr8cad6oFV+T5WYdGr Ix88GXuBGwZkV6oZZ7bnduJf+bmHTIo7hZ8oYB83F8po0MaTLYarBZGLZ8JY+gyc0zQz jaCQk8bkb925pggGhTQSpBgz2Vue4wxPFg9D0d4T6znoEuMKVvvGD0aAn8wfKTe+qVBX QrEQ== 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=fLf2dOaVN3sw1SLqblcSHjmdDQB+0Yq0IqK9YpIj1dI=; b=HhXDuzUjvtGhfOl6WsOpLdnjaGihH2LNNNKDac9tAvySGEsWmEDkOMJNVrH4f8O8zc 0m3AY9EJuLVbFt7R/auMmKrYxEfI+DrO0Zu9G+PpWidsnXCibc7qH7U/xtlw0NpJiprd tZygjL8P+s7XRoU4HxjjIESAJtP5Da44ig1zHzc1AJyBOwfCo4hmC7jvQ0DH4dBa+0hR KLPu1d60gjGRkMjl8I5jt9hSFfTM8ik6qk3TsNQK+fcRTKFVMuZ7YN8uu7iqXPPHtHzU uAsj8Y/gB807gUcD+50TT16VkOnlvJa0otv4x/t36N66+xzKqAt1XUoqUVXA3smdClHj woiw== X-Gm-Message-State: AG10YOT4Sa/F6tTI9Nj/Wahv8QnZm1rJ5eV22On3EtU85PyibMUlSpEQTQ9w2FJKpxJ9V6y2 X-Received: by 10.28.145.204 with SMTP id t195mr4319363wmd.91.1453476474769; Fri, 22 Jan 2016 07:27:54 -0800 (PST) Received: from gloops.dev.6wind.com (144.77.126.78.rev.sfr.net. [78.126.77.144]) by smtp.gmail.com with ESMTPSA id w73sm3359464wmw.21.2016.01.22.07.27.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jan 2016 07:27:54 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Fri, 22 Jan 2016 16:27:38 +0100 Message-Id: <1453476464-31767-4-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1453476464-31767-1-git-send-email-david.marchand@6wind.com> References: <1453476464-31767-1-git-send-email-david.marchand@6wind.com> Cc: viktorin@rehivetech.com Subject: [dpdk-dev] [PATCH 3/9] pci: minor cleanup 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: Fri, 22 Jan 2016 15:27:55 -0000 Those are the only fields that are explicitly set to 0 while the global dev pointer is set to 0 a few lines before. Signed-off-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 83eec5d..7bec30f 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -308,7 +308,6 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus, dev->id.subsystem_device_id = (uint16_t)tmp; /* get max_vfs */ - dev->max_vfs = 0; snprintf(filename, sizeof(filename), "%s/max_vfs", dirname); if (!access(filename, F_OK) && eal_parse_sysfs_value(filename, &tmp) == 0) @@ -323,12 +322,8 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus, } /* get numa node */ - snprintf(filename, sizeof(filename), "%s/numa_node", - dirname); - if (access(filename, R_OK) != 0) { - /* if no NUMA support, set default to 0 */ - dev->numa_node = 0; - } else { + snprintf(filename, sizeof(filename), "%s/numa_node", dirname); + if (!access(filename, R_OK)) { if (eal_parse_sysfs_value(filename, &tmp) < 0) { free(dev); return -1; -- 1.9.1