public inbox for linux-metag@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: James Hogan <james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
Cc: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] metag/pgtable: Fix undeclared vm_area_struct warning
Date: Thu, 11 May 2017 09:39:15 +0200	[thread overview]
Message-ID: <20170511073915.GC26782@dhcp22.suse.cz> (raw)
In-Reply-To: <20170510153620.28133-1-james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>

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-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org

Thanks for the fix anyway!

> 
> Fixes: 1f5307b1e094 ("mm, vmalloc: properly track vmalloc users")
> Signed-off-by: James Hogan <james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
> Cc: Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org>
> Cc: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  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

  parent reply	other threads:[~2017-05-11  7:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 15:36 [PATCH] metag/pgtable: Fix undeclared vm_area_struct warning James Hogan
     [not found] ` <20170510153620.28133-1-james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2017-05-11  7:39   ` Michal Hocko [this message]
     [not found]     ` <20170511073915.GC26782-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-05-11  8:14       ` James Hogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170511073915.GC26782@dhcp22.suse.cz \
    --to=mhocko-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org \
    --cc=linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox