On Wed 10-05-17 16:36:20, James Hogan wrote: > Since commit 1f5307b1e094 ("mm, vmalloc: properly track vmalloc users"), > linux/vmalloc.h includes asm/pgtable.h prior to declaring struct > vm_area_struct, resulting in warnings such as the following on metag: > > In file included from ./include/linux/vmalloc.h:10, > from lib/ioremap.c:9: > ./arch/metag/include/asm/pgtable.h:221: warning: ‘struct vm_area_struct’ declared inside parameter list > ./arch/metag/include/asm/pgtable.h:221: warning: its scope is only this definition or declaration, which is probably not what you want > > Metag's asm/pgtable.h doesn't actually need the definition of struct > vm_area_struct, so just declare struct vm_area_struct in the header > rather than including linux/mm_types.h. This will be fixed in a different way [1]. It just waits for Andrew to send the patch to Linus. [1] http://lkml.kernel.org/r/20170509153702.GR6481@xxxxxxxxxxxxxx Thanks for the fix anyway! > > Fixes: 1f5307b1e094 ("mm, vmalloc: properly track vmalloc users") > Signed-off-by: James Hogan <james.hogan@xxxxxxxxxx> > Cc: Michal Hocko <mhocko@xxxxxxxx> > Cc: linux-metag@xxxxxxxxxxxxxxx > --- > arch/metag/include/asm/pgtable.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/metag/include/asm/pgtable.h b/arch/metag/include/asm/pgtable.h > index ffa3a3a2ecad..4ccb81943ca4 100644 > --- a/arch/metag/include/asm/pgtable.h > +++ b/arch/metag/include/asm/pgtable.h > @@ -88,6 +88,8 @@ > > #include <asm/page.h> > > +struct vm_area_struct; /* vma defining user mapping in mm_types.h */ > + > /* zero page used for uninitialized stuff */ > extern unsigned long empty_zero_page; > #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) > -- > 2.12.2 -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-metag" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html