linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Mel Gorman <mgorman@suse.de>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kbuild test robot <fengguang.wu@intel.com>
Subject: Re: [PATCH] mm: Suppress mm/memory.o warning on older compilers if !CONFIG_NUMA_BALANCING
Date: Mon, 17 Dec 2012 12:49:49 -0800	[thread overview]
Message-ID: <20121217124949.3024dda3.akpm@linux-foundation.org> (raw)
In-Reply-To: <20121217114917.GF9887@suse.de>

On Mon, 17 Dec 2012 11:49:17 +0000
Mel Gorman <mgorman@suse.de> wrote:

> The kbuild test robot reported the following after the merge of Automatic
> NUMA Balancing when cross-compiling for avr32.
> 
> mm/memory.c: In function 'do_pmd_numa_page':
> mm/memory.c:3593: warning: no return statement in function returning non-void
> 
> The code is unreachable but the avr32 cross-compiler was not new enough
> to know that. This patch suppresses the warning.
> 
> Signed-off-by: Mel Gorman <mgorman@suse.de>
> ---
>  mm/memory.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/memory.c b/mm/memory.c
> index e6a3b93..23f1fdf 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -3590,6 +3590,7 @@ static int do_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
>  		     unsigned long addr, pmd_t *pmdp)
>  {
>  	BUG();
> +	return 0;
>  }
>  #endif /* CONFIG_NUMA_BALANCING */

Odd.  avr32's BUG() includes a call to unreachable(), which should
evaluate to "do { } while (1)".  Can you check that this is working?

Perhaps it _is_ working, but the compiler incorrectly thinks that the
function can return?


  reply	other threads:[~2012-12-17 20:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17 11:49 [PATCH] mm: Suppress mm/memory.o warning on older compilers if !CONFIG_NUMA_BALANCING Mel Gorman
2012-12-17 20:49 ` Andrew Morton [this message]
2012-12-18  7:34   ` David Rientjes

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=20121217124949.3024dda3.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).