Message ID | 20210520084809.8576-15-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 699C9C433ED for <linux-mm@archiver.kernel.org>; Thu, 20 May 2021 08:50:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 00F946124C for <linux-mm@archiver.kernel.org>; Thu, 20 May 2021 08:50:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00F946124C 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 9495B8D000B; Thu, 20 May 2021 04:50:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 920498D0001; Thu, 20 May 2021 04:50:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E87D8D000B; Thu, 20 May 2021 04:50:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id 4D34A8D0001 for <linux-mm@kvack.org>; Thu, 20 May 2021 04:50:51 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E3D35824C45E for <linux-mm@kvack.org>; Thu, 20 May 2021 08:50:50 +0000 (UTC) X-FDA: 78160989060.21.34E3D8D Received: from outbound-smtp46.blacknight.com (outbound-smtp46.blacknight.com [46.22.136.58]) by imf17.hostedemail.com (Postfix) with ESMTP id 07B6C40B8CD3 for <linux-mm@kvack.org>; Thu, 20 May 2021 08:50:49 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp46.blacknight.com (Postfix) with ESMTPS id 96196FAB51 for <linux-mm@kvack.org>; Thu, 20 May 2021 09:50:49 +0100 (IST) Received: (qmail 11710 invoked from network); 20 May 2021 08:50:49 -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:49 -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 14/14] mm/swap: Make NODE_DATA an inline function on CONFIG_FLATMEM Date: Thu, 20 May 2021 09:48:09 +0100 Message-Id: <20210520084809.8576-15-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: 07B6C40B8CD3 Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf17.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.58 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Rspamd-Server: rspam04 X-Stat-Signature: tdyyf3zg8f81syooizm7zb157ttsap3u X-HE-Tag: 1621500649-363633 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/mmzone.h b/include/linux/mmzone.h index 0d53eba1c383..8af2f9ff9737 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1044,7 +1044,10 @@ extern char numa_zonelist_order[]; #ifndef CONFIG_NEED_MULTIPLE_NODES extern struct pglist_data contig_page_data; -#define NODE_DATA(nid) (&contig_page_data) +static inline struct pglist_data *NODE_DATA(int nid) +{ + return &contig_page_data; +} #define NODE_MEM_MAP(nid) mem_map #else /* CONFIG_NEED_MULTIPLE_NODES */
make W=1 generates the following warning in mm/workingset.c for allnoconfig mm/workingset.c: In function ‘unpack_shadow’: mm/workingset.c:201:15: warning: variable ‘nid’ set but not used [-Wunused-but-set-variable] int memcgid, nid; ^~~ On FLATMEM, NODE_DATA returns a global pglist_data without dereferencing nid. 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/mmzone.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)