Message ID | 20210520084809.8576-12-mgorman@techsingularity.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=z6PN=KP=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18544C433ED for <linux-mm@archiver.kernel.org>; Thu, 20 May 2021 08:50:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B761B60234 for <linux-mm@archiver.kernel.org>; Thu, 20 May 2021 08:50:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B761B60234 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 552678D0007; Thu, 20 May 2021 04:50:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 529438D0001; Thu, 20 May 2021 04:50:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 417F08D0007; Thu, 20 May 2021 04:50:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id 114F98D0001 for <linux-mm@kvack.org>; Thu, 20 May 2021 04:50:20 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AA345180ACF75 for <linux-mm@kvack.org>; Thu, 20 May 2021 08:50:19 +0000 (UTC) X-FDA: 78160987758.19.6194C56 Received: from outbound-smtp32.blacknight.com (outbound-smtp32.blacknight.com [81.17.249.64]) by imf22.hostedemail.com (Postfix) with ESMTP id E09D1C0042D9 for <linux-mm@kvack.org>; Thu, 20 May 2021 08:50:17 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp32.blacknight.com (Postfix) with ESMTPS id DA240BEC91 for <linux-mm@kvack.org>; Thu, 20 May 2021 09:50:17 +0100 (IST) Received: (qmail 9881 invoked from network); 20 May 2021 08:50:17 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.23.168]) by 81.17.254.9 with ESMTPA; 20 May 2021 08:50:17 -0000 From: Mel Gorman <mgorman@techsingularity.net> To: Andrew Morton <akpm@linux-foundation.org> Cc: Michal Hocko <mhocko@kernel.org>, David Hildenbrand <david@redhat.com>, Vlastimil Babka <vbabka@suse.cz>, Dan Streetman <ddstreet@ieee.org>, Yang Shi <shy828301@gmail.com>, Linux-MM <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>, Mel Gorman <mgorman@techsingularity.net> Subject: [PATCH 11/14] mm/swap: Make swap_address_space an inline function Date: Thu, 20 May 2021 09:48:06 +0100 Message-Id: <20210520084809.8576-12-mgorman@techsingularity.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210520084809.8576-1-mgorman@techsingularity.net> References: <20210520084809.8576-1-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Rspamd-Queue-Id: E09D1C0042D9 Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf22.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.64 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Rspamd-Server: rspam04 X-Stat-Signature: 7pcpyprt86ze5juyhhdedixzcgmhj5w5 X-HE-Tag: 1621500617-444913 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Clean W=1 build warnings for mm/
|
expand
|
diff --git a/include/linux/swap.h b/include/linux/swap.h index 144727041e78..216462c78a91 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -526,7 +526,11 @@ static inline struct swap_info_struct *swp_swap_info(swp_entry_t entry) return NULL; } -#define swap_address_space(entry) (NULL) +static inline struct address_space *swap_address_space(swp_entry_t entry) +{ + return NULL; +} + #define get_nr_swap_pages() 0L #define total_swap_pages 0L #define total_swapcache_pages() 0UL
make W=1 generates the following warning in page_mapping() for allnoconfig mm/util.c:700:15: warning: variable ‘entry’ set but not used [-Wunused-but-set-variable] swp_entry_t entry; ^~~~~ swap_address is a #define on !CONFIG_SWAP configurations. Make the helper an inline function to suppress the warning, add type checking and to apply any side-effects in the parameter list. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> --- include/linux/swap.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)