From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932631AbdHWS1z (ORCPT ); Wed, 23 Aug 2017 14:27:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43544 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932405AbdHWS1y (ORCPT ); Wed, 23 Aug 2017 14:27:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D97FB85363 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jglisse@redhat.com Date: Wed, 23 Aug 2017 14:27:50 -0400 From: Jerome Glisse To: Arnd Bergmann Cc: Andrew Morton , Stephen Rothwell , Huang Ying , Johannes Weiner , Tim Chen , Minchan Kim , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: swap: make free_swap_and_cache()/swapcache_prepare() inline functions Message-ID: <20170823182750.GB4835@redhat.com> References: <20170823133213.712917-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170823133213.712917-1-arnd@arndb.de> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 23 Aug 2017 18:27:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Thanks for taking care of that. Reviewed-by: Jérôme Glisse