From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id DC243C6AC for ; Fri, 29 Jan 2016 15:49:20 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id p63so71750129wmp.1 for ; Fri, 29 Jan 2016 06:49:20 -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=qDpjoVKS1kVKBZ3mZqlJz86IbiLiXBKihTZ9NIZ4FIk=; b=KBHzkBHGYWoWWmMiUeek97tBrCjdRd5q/aSFLoSPqDlwxI0P4JmowqSOGuyOP9rATl KG9IXyk5RGvDO4QI2Dd2phJjqR6hT7wf1q6Bhmm+CXYPqkUPho/3c/dnHcGbwiMoJDaQ wyLr7YdHHG8zXsJdNTZw8gHGz1BDic9lDenMdwrtCLN1O9/Ti8dqIswrMp8dZdxvURt8 PO6lj6P14oLrwBW18uxaMkjKk3F1F1wqkm/JGYUZgcVzoq8q85NiJdrgb0VLZXV/AZ11 B0KscjekP0uiuBmsPxA8ZLzsqnx9CrfzeLJx71r0ojl3YPAhazZZ7GS7COYcL81Yx3w5 CR0Q== 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=qDpjoVKS1kVKBZ3mZqlJz86IbiLiXBKihTZ9NIZ4FIk=; b=FXNCKDAHSC3Zp7Y8rXIf14OeJ+FZPMWNm0VIlRJZ01BG6p5WOdE7y72mzpw9Pxz5J6 mdP0sWQSWaNx1zpkztTa8ULAPLvonTdUiH+ae+Z3V+09CKozR4u//gkyefbKLeaME1M4 TpsLmmq9WVPBAhN/mY1N8B/bKcs9esroV11mLVFyoEutQjHu9oQEHX2ITN4PbXPm1Oyq k8j0++SJLuuTwnE/TE9pzRdRVU2+BcYncBeIL4nF8xEgtMzPYXiGPOArLwQOUm1frPKi Mw348+tr9/OqAwhnjPktr4NM0X5g6u2yq5pIMsiSMop3y2VbCI3bsG9yXfkpSGcGPByu BopQ== X-Gm-Message-State: AG10YOTujb8fLjyrcshhwxdV8TICHNVt0DpbKZPxKV7mz+6O4umdbVRksy5BwRUShhGxXEg0 X-Received: by 10.28.173.71 with SMTP id w68mr9999811wme.88.1454078960769; Fri, 29 Jan 2016 06:49:20 -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 y188sm7811294wmy.11.2016.01.29.06.49.19 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 29 Jan 2016 06:49:20 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Fri, 29 Jan 2016 15:49:06 +0100 Message-Id: <1454078953-23744-3-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454078953-23744-1-git-send-email-david.marchand@6wind.com> References: <1453476464-31767-1-git-send-email-david.marchand@6wind.com> <1454078953-23744-1-git-send-email-david.marchand@6wind.com> Cc: viktorin@rehivetech.com Subject: [dpdk-dev] [PATCH v2 2/9] pci/linux: 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, 29 Jan 2016 14:49:21 -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 d9d6de7..6751b48 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