2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-17 23:25:46 +08:00

net: use NUMA_NO_NODE instead of the magic number -1

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Changli Gao 2010-12-14 03:09:15 +00:00 committed by David S. Miller
parent caafa84251
commit b236da6931
3 changed files with 4 additions and 3 deletions

View File

@ -530,7 +530,7 @@ static inline int netdev_queue_numa_node_read(const struct netdev_queue *q)
#if defined(CONFIG_XPS) && defined(CONFIG_NUMA)
return q->numa_node;
#else
return -1;
return NUMA_NO_NODE;
#endif
}

View File

@ -5121,7 +5121,7 @@ static void netdev_init_one_queue(struct net_device *dev,
spin_lock_init(&queue->_xmit_lock);
netdev_set_xmit_lockdep_class(&queue->_xmit_lock, dev->type);
queue->xmit_lock_owner = -1;
netdev_queue_numa_node_write(queue, -1);
netdev_queue_numa_node_write(queue, NUMA_NO_NODE);
queue->dev = dev;
}

View File

@ -1009,7 +1009,8 @@ static ssize_t store_xps_map(struct netdev_queue *queue,
if (dev_maps)
call_rcu(&dev_maps->rcu, xps_dev_maps_release);
netdev_queue_numa_node_write(queue, (numa_node >= 0) ? numa_node : -1);
netdev_queue_numa_node_write(queue, (numa_node >= 0) ? numa_node :
NUMA_NO_NODE);
mutex_unlock(&xps_map_mutex);