]> www.infradead.org Git - users/willy/linux.git/commitdiff
mm/mremap: fix 'move_normal_pmd' unused function warning
authorJoel Fernandes (Google) <joel@joelfernandes.org>
Wed, 5 Dec 2018 00:13:35 +0000 (11:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2018 00:13:35 +0000 (11:13 +1100)
The move_normal_pmd function may not be used on architectures that don't
enable HAVE_MOVE_PMD.  This has shown to cause unused function warnings on
those architectures.  Lets not define it for those cases.

Link: http://lkml.kernel.org/r/20181108224457.GB209347@google.com
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Reported-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/mremap.c

index 2591e512373a3d7efadd0e6e2ef972fe9b9999e2..feff311637f134a071aadcdcfcdd973698947af5 100644 (file)
@@ -191,6 +191,7 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
                drop_rmap_locks(vma);
 }
 
+#ifdef CONFIG_HAVE_MOVE_PMD
 static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr,
                  unsigned long new_addr, unsigned long old_end,
                  pmd_t *old_pmd, pmd_t *new_pmd)
@@ -234,6 +235,7 @@ static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr,
 
        return true;
 }
+#endif
 
 unsigned long move_page_tables(struct vm_area_struct *vma,
                unsigned long old_addr, struct vm_area_struct *new_vma,