From: Joel Fernandes (Google) Date: Wed, 5 Dec 2018 00:13:35 +0000 (+1100) Subject: mm/mremap: fix 'move_normal_pmd' unused function warning X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=cc5451620c645062331569ebbed15ee037fb3bc4;p=users%2Fwilly%2Flinux.git mm/mremap: fix 'move_normal_pmd' unused function warning 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) Reported-by: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- diff --git a/mm/mremap.c b/mm/mremap.c index 2591e512373a..feff311637f1 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -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,