net: use NUMA_NO_NODE instead of the magic number -1
authorChangli Gao <xiaosuo@gmail.com>
Tue, 14 Dec 2010 03:09:15 +0000 (03:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Dec 2010 21:16:06 +0000 (13:16 -0800)
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c
net/core/net-sysfs.c

index 445e6825f8eb12bb2578977357b34159ba49177b..cc916c5c327954ed515df20b0781269f1c10f6eb 100644 (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
 }
 
index b25dd087f06a7c13282bfc858c698d42babda60b..7ac26d2b97220980b5d85200b9a15c698d79b56c 100644 (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;
 }
 
index 85e8b5326dd6a9cb670aadb4df143fad023cabd5..e23c01be5a5bdf27012ab839f05abd5a9366532f 100644 (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);