Skip to content

Commit

Permalink
net: use NUMA_NO_NODE instead of the magic number -1
Browse files Browse the repository at this point in the history
Signed-off-by: Changli Gao <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
xiaosuo authored and davem330 committed Dec 16, 2010
1 parent caafa84 commit b236da6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b236da6

Please sign in to comment.