[tip:sched/numa] mm/mpol: Fix build warning for UMA kernels
From: tip-bot for David Rientjes
Date: Thu Oct 04 2012 - 06:33:19 EST
Commit-ID: d886931968a1c7e7bc7d4891cbd12cecf3111bd0
Gitweb: http://git.kernel.org/tip/d886931968a1c7e7bc7d4891cbd12cecf3111bd0
Author: David Rientjes <rientjes@xxxxxxxxxx>
AuthorDate: Tue, 2 Oct 2012 13:14:10 -0700
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Thu, 4 Oct 2012 10:15:16 +0200
mm/mpol: Fix build warning for UMA kernels
Commit "mm, mpol: Use special PROT_NONE to migrate pages"
causes a build warning when CONFIG_NUMA is not enabled:
mm/huge_memory.c: In function 'do_huge_pmd_prot_none':
mm/huge_memory.c:745: warning: unused variable 'node'
"node" is only used once, so avoid using it altogether.
Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx>
Cc: pjt@xxxxxxxxxx
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Link: http://lkml.kernel.org/r/alpine.DEB.2.00.1210021312140.8537@xxxxxxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
mm/huge_memory.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 4a9ea86..2e2a814 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -768,7 +768,6 @@ void do_huge_pmd_prot_none(struct mm_struct *mm, struct vm_area_struct *vma,
{
unsigned long haddr = address & HPAGE_PMD_MASK;
struct page *page = NULL;
- int node;
spin_lock(&mm->page_table_lock);
if (unlikely(!pmd_same(*pmd, entry)))
@@ -791,8 +790,7 @@ void do_huge_pmd_prot_none(struct mm_struct *mm, struct vm_area_struct *vma,
* XXX should we serialize against split_huge_page ?
*/
- node = mpol_misplaced(page, vma, haddr, mm->numa_big);
- if (node == -1)
+ if (mpol_misplaced(page, vma, haddr, mm->numa_big) == -1)
goto do_fixup;
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/