aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJianguo Wu <wujianguo@huawei.com>2013-11-12 18:07:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:06 -0500
commitb76ac7e734608d706bf225be062a7a46d165dda6 (patch)
tree1ded9a6416a9f39044ead1aee578f0fc67a5acc1 /mm
parent9f1b868a13ac36bd207a571f5ea1193d823ab18d (diff)
mm/mempolicy: use NUMA_NO_NODE
Use more appropriate NUMA_NO_NODE instead of -1 Signed-off-by: Jianguo Wu <wujianguo@huawei.com> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/mempolicy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 260b8213a873..4cc19f6ab6c6 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1125,7 +1125,7 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
1125 tmp = *from; 1125 tmp = *from;
1126 while (!nodes_empty(tmp)) { 1126 while (!nodes_empty(tmp)) {
1127 int s,d; 1127 int s,d;
1128 int source = -1; 1128 int source = NUMA_NO_NODE;
1129 int dest = 0; 1129 int dest = 0;
1130 1130
1131 for_each_node_mask(s, tmp) { 1131 for_each_node_mask(s, tmp) {
@@ -1160,7 +1160,7 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
1160 if (!node_isset(dest, tmp)) 1160 if (!node_isset(dest, tmp))
1161 break; 1161 break;
1162 } 1162 }
1163 if (source == -1) 1163 if (source == NUMA_NO_NODE)
1164 break; 1164 break;
1165 1165
1166 node_clear(source, tmp); 1166 node_clear(source, tmp);
@@ -1835,7 +1835,7 @@ static unsigned offset_il_node(struct mempolicy *pol,
1835 unsigned nnodes = nodes_weight(pol->v.nodes); 1835 unsigned nnodes = nodes_weight(pol->v.nodes);
1836 unsigned target; 1836 unsigned target;
1837 int c; 1837 int c;
1838 int nid = -1; 1838 int nid = NUMA_NO_NODE;
1839 1839
1840 if (!nnodes) 1840 if (!nnodes)
1841 return numa_node_id(); 1841 return numa_node_id();
@@ -1872,11 +1872,11 @@ static inline unsigned interleave_nid(struct mempolicy *pol,
1872 1872
1873/* 1873/*
1874 * Return the bit number of a random bit set in the nodemask. 1874 * Return the bit number of a random bit set in the nodemask.
1875 * (returns -1 if nodemask is empty) 1875 * (returns NUMA_NO_NODE if nodemask is empty)
1876 */ 1876 */
1877int node_random(const nodemask_t *maskp) 1877int node_random(const nodemask_t *maskp)
1878{ 1878{
1879 int w, bit = -1; 1879 int w, bit = NUMA_NO_NODE;
1880 1880
1881 w = nodes_weight(*maskp); 1881 w = nodes_weight(*maskp);
1882 if (w) 1882 if (w)