Commit 19b05f81 authored by david decotigny's avatar david decotigny Committed by David S. Miller

net-sysfs: fixed minor sparse warning

This commit fixes following warning:
net/core/net-sysfs.c:921:6: warning: symbol 'numa_node' shadows an earlier one
include/linux/topology.h:222:1: originally declared here
Signed-off-by: default avatarDavid Decotigny <david.decotigny@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 674aee3b
...@@ -901,7 +901,7 @@ static ssize_t store_xps_map(struct netdev_queue *queue, ...@@ -901,7 +901,7 @@ static ssize_t store_xps_map(struct netdev_queue *queue,
struct xps_map *map, *new_map; struct xps_map *map, *new_map;
struct xps_dev_maps *dev_maps, *new_dev_maps; struct xps_dev_maps *dev_maps, *new_dev_maps;
int nonempty = 0; int nonempty = 0;
int numa_node = -2; int numa_node_id = -2;
if (!capable(CAP_NET_ADMIN)) if (!capable(CAP_NET_ADMIN))
return -EPERM; return -EPERM;
...@@ -944,10 +944,10 @@ static ssize_t store_xps_map(struct netdev_queue *queue, ...@@ -944,10 +944,10 @@ static ssize_t store_xps_map(struct netdev_queue *queue,
need_set = cpumask_test_cpu(cpu, mask) && cpu_online(cpu); need_set = cpumask_test_cpu(cpu, mask) && cpu_online(cpu);
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
if (need_set) { if (need_set) {
if (numa_node == -2) if (numa_node_id == -2)
numa_node = cpu_to_node(cpu); numa_node_id = cpu_to_node(cpu);
else if (numa_node != cpu_to_node(cpu)) else if (numa_node_id != cpu_to_node(cpu))
numa_node = -1; numa_node_id = -1;
} }
#endif #endif
if (need_set && pos >= map_len) { if (need_set && pos >= map_len) {
...@@ -997,7 +997,7 @@ static ssize_t store_xps_map(struct netdev_queue *queue, ...@@ -997,7 +997,7 @@ static ssize_t store_xps_map(struct netdev_queue *queue,
if (dev_maps) if (dev_maps)
kfree_rcu(dev_maps, rcu); kfree_rcu(dev_maps, rcu);
netdev_queue_numa_node_write(queue, (numa_node >= 0) ? numa_node : netdev_queue_numa_node_write(queue, (numa_node_id >= 0) ? numa_node_id :
NUMA_NO_NODE); NUMA_NO_NODE);
mutex_unlock(&xps_map_mutex); mutex_unlock(&xps_map_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment