[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1341370901-14187-1-git-send-email-amwang@redhat.com>
Date: Wed, 4 Jul 2012 11:01:38 +0800
From: Cong Wang <amwang@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
WANG Cong <xiyou.wangcong@...il.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Mel Gorman <mgorman@...e.de>,
David Rientjes <rientjes@...gle.com>,
Rik van Riel <riel@...hat.com>, linux-mm@...ck.org
Subject: [Patch] mm/policy: use int instead of unsigned for nid
From: WANG Cong <xiyou.wangcong@...il.com>
'nid' should be 'int', not 'unsigned'.
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: Mel Gorman <mgorman@...e.de>
Cc: David Rientjes <rientjes@...gle.com>
Cc: Rik van Riel <riel@...hat.com>
Signed-off-by: WANG Cong <xiyou.wangcong@...il.com>
---
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 1d771e4..3cabe81 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1580,9 +1580,9 @@ static struct zonelist *policy_zonelist(gfp_t gfp, struct mempolicy *policy,
}
/* Do dynamic interleaving for a process */
-static unsigned interleave_nodes(struct mempolicy *policy)
+static int interleave_nodes(struct mempolicy *policy)
{
- unsigned nid, next;
+ int nid, next;
struct task_struct *me = current;
nid = me->il_next;
@@ -1638,7 +1638,7 @@ unsigned slab_node(struct mempolicy *policy)
}
/* Do static interleaving for a VMA with known offset. */
-static unsigned offset_il_node(struct mempolicy *pol,
+static int offset_il_node(struct mempolicy *pol,
struct vm_area_struct *vma, unsigned long off)
{
unsigned nnodes = nodes_weight(pol->v.nodes);
@@ -1658,7 +1658,7 @@ static unsigned offset_il_node(struct mempolicy *pol,
}
/* Determine a node number for interleave */
-static inline unsigned interleave_nid(struct mempolicy *pol,
+static inline int interleave_nid(struct mempolicy *pol,
struct vm_area_struct *vma, unsigned long addr, int shift)
{
if (vma) {
@@ -1827,7 +1827,7 @@ out:
/* Allocate a page in interleaved policy.
Own path because it needs to do special accounting. */
static struct page *alloc_page_interleave(gfp_t gfp, unsigned order,
- unsigned nid)
+ int nid)
{
struct zonelist *zl;
struct page *page;
@@ -1876,7 +1876,7 @@ retry_cpuset:
cpuset_mems_cookie = get_mems_allowed();
if (unlikely(pol->mode == MPOL_INTERLEAVE)) {
- unsigned nid;
+ int nid;
nid = interleave_nid(pol, vma, addr, PAGE_SHIFT + order);
mpol_cond_put(pol);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists