All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Glisse <jglisse@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Huang Ying <ying.huang@intel.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Minchan Kim <minchan@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: swap: make free_swap_and_cache()/swapcache_prepare() inline functions
Date: Wed, 23 Aug 2017 14:27:50 -0400	[thread overview]
Message-ID: <20170823182750.GB4835@redhat.com> (raw)
In-Reply-To: <20170823133213.712917-1-arnd@arndb.de>

On Wed, Aug 23, 2017 at 03:31:42PM +0200, Arnd Bergmann wrote:
> We get a build warning from a boolean expression that is never used:
> 
> mm/madvise.c: In function 'madvise_free_pte_range':
> include/linux/swap.h:490:55: error: value computed is not used [-Werror=unused-value]
>  #define free_swap_and_cache(e) (is_migration_entry(e) || is_device_private_entry(e))
>                                                        ^~
> mm/madvise.c:353:4: note: in expansion of macro 'free_swap_and_cache'
>     free_swap_and_cache(entry);
> 
> This changes the two macros to a compound expression that gcc does
> not warn about. Changing them to inline functions would have been
> nicer but is not possible here because that would introduce a recursive
> header file dependency.
> 
> Fixes: mmotm ("mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for taking care of that.

Reviewed-by: Jérôme Glisse <jglisse@redhat.com>

      reply	other threads:[~2017-08-23 18:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 13:31 Arnd Bergmann
2017-08-23 18:27 ` Jerome Glisse [this message]

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=20170823182750.GB4835@redhat.com \
    --to=jglisse@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tim.c.chen@linux.intel.com \
    --cc=ying.huang@intel.com \
    --subject='Re: [PATCH] mm: swap: make free_swap_and_cache()/swapcache_prepare() inline functions' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.