Message ID | 20250127231631.4363-1-42.hyeyoo@gmail.com (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 70A34C02188 for <linux-mm@archiver.kernel.org>; Mon, 27 Jan 2025 14:17:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A67CD280160; Mon, 27 Jan 2025 09:17:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EFA428015C; Mon, 27 Jan 2025 09:17:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 88163280160; Mon, 27 Jan 2025 09:17:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 6566B28015C for <linux-mm@kvack.org>; Mon, 27 Jan 2025 09:17:42 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 1783D1A0189 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 14:17:42 +0000 (UTC) X-FDA: 83053435164.27.6C1E55B Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by imf06.hostedemail.com (Postfix) with ESMTP id 3B652180017 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 14:17:40 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ARxDh7Lz; spf=pass (imf06.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.178 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737987460; 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=P/CPTbobyAjtuByVIH2M774TE+8RXqzGe2W8xbUaB+0=; b=COF0xqyZmaqWgRHIT+fs6BVazNa34vaC4bKqKPbqGk254SYqweicDOK9sqKLZLpQW4NVgb Kb41xrbt2CBNf/1ZHsZkiSZDiMjRT+fWkHGEWt9mnuy4o/Qf+N9f1c9twWfZCNjsDRtJoK dERTgSw2aAYI1Sq3IDLQAPgH/TiLZFo= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ARxDh7Lz; spf=pass (imf06.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.178 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737987460; a=rsa-sha256; cv=none; b=bza5xoYMj1pGtNvdd2h7AI7QP6eZq/pHkky/U+YCt9K5G2FhVNEb2gU9EdNvLuzKWfBaUd HdAS0vFsMcBm/AFB99UsTJcf6yDejOdAktOxW9/c10urPY7GYq96c8JhNd4SWqMk37vihv 3TnaXe3v8EI1YXClCd7wc4VYZF9xzx8= Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-216426b0865so72739735ad.0 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 06:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737987459; x=1738592259; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=P/CPTbobyAjtuByVIH2M774TE+8RXqzGe2W8xbUaB+0=; b=ARxDh7LzUAk6CG+iWmazGgO3YpERRLCqNVeGJokw1uizzPzAtXpSFSGG/F/Kng6Uer qqygaptCnFA4LKo//Ct5I/eaBCpMdruzysiTkJh6nIKAZu/aZ5IDpKI4JBpg5hnVnGGn Yh8gyvq36EYWSE3L1tlbvCWdaWo3CpntlKPUORC2K5+x5QYP3DJB6PgroxSCowIthjVf jCZccFeZPk0Qt27eHB41ZM7tECgyiq/zY8gbUM3PmPz3ixBjnSLO83FwUT9ZsO++qvX/ SJ1DBRm62lGQmiu4AvdXckOzszVZf4+1qnOiYJ+NQXxq1f4vi7agBqknSC6ig7YNu2+w eZ6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737987459; x=1738592259; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P/CPTbobyAjtuByVIH2M774TE+8RXqzGe2W8xbUaB+0=; b=m5EjbrQ1uWfU21TFBUNoFQ37dSQEoryWnCl+DCP+PIZPPAz5K/XCLX0Yq22SYklZQe Q/aKBK3Cy/AMQ8FPZVlqQAs8CHOeZTp65rqhFJinqv9yw3TWAjd97kNastb/g1uGrNRD uJtcKKJiDXr993sl9uLmYv92sbIr7qBDBbtDk+2zy9OcRZo4tCqcN+5uDKNYV9WHdH8P KMZzY9siQtBKCgSbG/h3fMpW+/5Kx4WBMiYzWdrJlJsvR0FE50B8qr8HT3wsmDEXx3Kz eTcMAHitJNWVvW9POq+Ei/1priaOlj7hySsGoePJXQ30T4IlZoScTDF66Wu4lRh4Wbz/ IkpA== X-Forwarded-Encrypted: i=1; AJvYcCXJzORUbNvEDIvilUQ1NeAUKocJKVcqQ/q4c90mKo32PJ7Fp1JhZp/PzfN8dJhj5+qVJZxED3dTEw==@kvack.org X-Gm-Message-State: AOJu0YwrQCf4wAWxLpuhQ1yaP8UASDYKbW6MXD6KQqJQwC9fgKO4/KQG 4LezkEWCStAbmI3GPPo90wIj9XB0M8MCupMP9vLM/FxOmw06z+xG X-Gm-Gg: ASbGncuma5HLqdOQjDvAJ06090moRZbkDB9wly2waYB4c08h0fnRJeyakLHeIrk/v9x OopdBczAq1h8HGXnge1nt4oMkUGEiB1iDklgc8RzmP0JcONoPE/adsb59oz2KscTT0+afD850Ds B/V/45JCJKq7gioAsS6D7XP9e4GE/yXFDisYtmNmUFrUFKZzHmDQikdiRwxcH5BPb5BF6XUv0Tj bDueUTI7njc9n42LJd5Os9gBzeecUc1FPZtqMQTBDJSdp/Di4nrrQFdMqmt3gtmUEBYS2nDxUoP WKvW3WHkbBOPjV4q3LL64A== X-Google-Smtp-Source: AGHT+IEhMkskblsFbB8Z/zyCAOYiSDmXIB/8tG1+iNIDff2QS2lfnrzJ+sYaxwlUYCmPajcGviXQyA== X-Received: by 2002:a17:902:d2d2:b0:216:2e6d:baac with SMTP id d9443c01a7336-21c3554b4d7mr674182715ad.29.1737987458679; Mon, 27 Jan 2025 06:17:38 -0800 (PST) Received: from hyeyoo-laptop.localdomain ([114.29.17.235]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ac9abacedd2sm2632611a12.17.2025.01.27.06.17.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 06:17:37 -0800 (PST) From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Minchan Kim <minchan@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org>, Andrew Morton <akpm@linux-foundation.org> Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Alex Shi <alexs@kernel.org>, linux-mm@kvack.org, kernel test robot <lkp@intel.com> Subject: [PATCH hotfix] mm/zsmalloc: add __maybe_unused attribute for is_first_zpdesc() Date: Tue, 28 Jan 2025 08:16:31 +0900 Message-ID: <20250127231631.4363-1-42.hyeyoo@gmail.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 3B652180017 X-St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z0k7vkdN7qkEIUvwaBsOq2Si509fYaXzHAJ3cO1fPEUY3LecdhWzfOqGdUYYh6t29isA79t0ErXdyFxAY72J+Xk6RITMsG4Sb0IMbc8BbYk+ysn0yvWDEkv527xNRYlGyGr6oJcRB6KWAmM+RrcIU85CBpUWMSddvm+AQsvLqi0DyuBU0kCz4AIWhsZkUE4f2jqR5+VNmpgxD0JVdra4+5iDpjiy6GXbftORvQYcx3JVl1hYEn8piCyCAzEv1bAIUMDXMPRNW/EcmiHQKfIjuwiIaeIdsvyk9RBMWUf39lbt2bQS7UGX8Jgzt17VJDx+LbO5rzO6+XXffrjA2171qWgzniYBsDvmA1peibQNzr/XNSP9fpmLtdaVNG89bbNNnOXpoHALbFHVs2sct01rhK8ZyetCeS14t3K3c9i5ULDxZpRa3JQPwcpP73xNQrhNB7DLDdEhDEE4w3AqWyO8LTM3/YYN/3hr06O0I/Qmwzt0P/P3QeSBnoAatCN1z4NDB8vbQC5j3qWIH87oWSiLCQ+2weIPnJ2ZYbTT+UqFShQAEezAW8Yh59qEe1W62y3pSh8RwKK9gmJwAGZoCr 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 |
[hotfix] mm/zsmalloc: add __maybe_unused attribute for is_first_zpdesc()
|
expand
|
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 817626a351f8..6d0e47f7ae33 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -452,7 +452,7 @@ static DEFINE_PER_CPU(struct mapping_area, zs_map_area) = { .lock = INIT_LOCAL_LOCK(lock), }; -static inline bool is_first_zpdesc(struct zpdesc *zpdesc) +static inline bool __maybe_unused is_first_zpdesc(struct zpdesc *zpdesc) { return PagePrivate(zpdesc_page(zpdesc)); }
Commit c1b3bb73d55e ("mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage()") introduces is_first_zpdesc() function. However, the function is only used when CONFIG_DEBUG_VM=y. When building with LLVM=1 and W=1 option, the following warning is generated: $ make -j12 W=1 LLVM=1 mm/zsmalloc.o mm/zsmalloc.c:455:20: error: function 'is_first_zpdesc' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] 455 | static inline bool is_first_zpdesc(struct zpdesc *zpdesc) | ^~~~~~~~~~~~~~~ 1 error generated. Fix the warning by adding __maybe_unused attribute to the function. No functional change intended. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501240958.4ILzuBrH-lkp@intel.com/ Fixes: c1b3bb73d55e ("mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage()") Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> --- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)