lkml.org 
[lkml]   [2012]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch sched/numa] mm/mpol: Fix build warning for UMA kernels
"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@google.com>
---
mm/huge_memory.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -742,7 +742,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)))
@@ -765,8 +764,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;

/*

\
 
 \ /
  Last update: 2012-10-02 23:01    [W:0.043 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site