Message ID | 20241212213126.1269116-1-bvanassche@acm.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0329CE7717F for <linux-mm@archiver.kernel.org>; Thu, 12 Dec 2024 21:31:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F3256B00A0; Thu, 12 Dec 2024 16:31:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A2756B00A3; Thu, 12 Dec 2024 16:31:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56A276B00A4; Thu, 12 Dec 2024 16:31:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 39C346B00A0 for <linux-mm@kvack.org>; Thu, 12 Dec 2024 16:31:42 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E62AC1A08CB for <linux-mm@kvack.org>; Thu, 12 Dec 2024 21:31:41 +0000 (UTC) X-FDA: 82887602574.09.7CD5BDC Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) by imf16.hostedemail.com (Postfix) with ESMTP id D57A7180004 for <linux-mm@kvack.org>; Thu, 12 Dec 2024 21:31:14 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=acm.org header.s=mr01 header.b=q6yFIl1N; dmarc=pass (policy=reject) header.from=acm.org; spf=pass (imf16.hostedemail.com: domain of bvanassche@acm.org designates 199.89.1.12 as permitted sender) smtp.mailfrom=bvanassche@acm.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734039077; a=rsa-sha256; cv=none; b=NXqcoMCquhK+34TuBYMoQenjHHyxIW3D+/Kyndn3GXkgXbLfO1wWtyWZxFLl6uVSM52f5p XPK9tpoT0ckNt34uaReffCRoxG8pXDv+9ncfsn5zRytrCCAvZZ42V8TNLLjEj2apwuQFDU FAAUZMYpopL1fowQzw5vDxKXiFm2Gfo= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=acm.org header.s=mr01 header.b=q6yFIl1N; dmarc=pass (policy=reject) header.from=acm.org; spf=pass (imf16.hostedemail.com: domain of bvanassche@acm.org designates 199.89.1.12 as permitted sender) smtp.mailfrom=bvanassche@acm.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734039077; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=Gq9UgELc1T0McgktC94YNgudGf8/e3D3RxMRSvnOWac=; b=23GIlAj6DuG3ALg7hrZVwtinj7F30fnFo4wOPJsTRex0Gr2ce6mVAg4f+DDHkyfP4qH38a N5sFsoeZCq6v6dW0zOY8Clcv/lyr8YJpK2i87/0ROsDUXX8dvi5vExkIObxVNwsYjvte2D Vhm+13WH8tT5JGa1aq+t+0NDxK9rvns= Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4Y8Qdl0J9Mzlff0P; Thu, 12 Dec 2024 21:31:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=mr01; t= 1734039096; x=1736631097; bh=Gq9UgELc1T0McgktC94YNgudGf8/e3D3RxM RSvnOWac=; b=q6yFIl1NbRXbDgxOG9jKI0jhXBF2JIuRNBNldYDXHc5zAPwzGHO 68/IrmCropFbXt7Y+112hIwYurghh4xluPFfV5Sjf0+5BrQUDaZwT28+FsOJ4pYi u8S84GZXdNz8PXNIW0PYCNVOwcvo3YE/2mH3id26x/d8rkK+w8ctHwYB1y8zK0Ni a/N7/kY2kTMHZpdKwec/PBRm26NSQ/lwF4nfS6nYp190MH4szUnjGl2NwgjWfXTv VNDczrjRVqahNWh4onHoguqlJ1QoThSfB2qiPNFpetcurouIEYoo0g78gatvIdnZ A8RLuGO1WX/LgX6EzDAW5FXIuwphqy7pGUg== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id 9QsWU-5S--Tc; Thu, 12 Dec 2024 21:31:36 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4Y8Qdg00Fgzlff09; Thu, 12 Dec 2024 21:31:34 +0000 (UTC) From: Bart Van Assche <bvanassche@acm.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org, Bart Van Assche <bvanassche@acm.org>, Konstantin Khlebnikov <koct9i@gmail.com>, Nathan Chancellor <nathan@kernel.org> Subject: [PATCH] mm/vmstat: Fix a W=1 clang compiler warning Date: Thu, 12 Dec 2024 13:31:26 -0800 Message-ID: <20241212213126.1269116-1-bvanassche@acm.org> X-Mailer: git-send-email 2.47.1.613.gc27f4b7a9f-goog MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Stat-Signature: do15nn6eu4jq9gzamgrqashygpwwggfk X-Rspam-User: X-Rspamd-Queue-Id: D57A7180004 X-Rspamd-Server: rspam08 X-HE-Tag: 1734039074-534381 X-HE-Meta: U2FsdGVkX1+sNk1mZmN86ytSR18IvC7X5gP44G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827VCnEEuYINwPMCphwvoc+4lnFyT5Kw6csn0cMDUq7xWJ0sQmzZWlKeQ22sZvdQ2Sb4uZhVny34EA8+2dSCDMBe2c/6X/r7fjk7488Kb1EsUot4T+ipA5 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> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/vmstat: Fix a W=1 clang compiler warning
|
expand
|
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index d2761bf8ff32..9f3a04345b86 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -515,7 +515,7 @@ static inline const char *node_stat_name(enum node_stat_item item) static inline const char *lru_list_name(enum lru_list lru) { - return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" + return node_stat_name(NR_LRU_BASE + (enum node_stat_item)lru) + 3; // skip "nr_" } #if defined(CONFIG_VM_EVENT_COUNTERS) || defined(CONFIG_MEMCG)
Fix the following clang compiler warning that is reported if the kernel is built with W=1: ./include/linux/vmstat.h:518:36: error: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Werror,-Wenum-enum-conversion] 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Nathan Chancellor <nathan@kernel.org> Fixes: 9d7ea9a297e6 ("mm/vmstat: add helpers to get vmstat item names for each enum type") Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- include/linux/vmstat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)