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 <david.marchand at 6wind.com>
---
 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

Reply via email to