From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E77C21C232B for ; Thu, 19 Dec 2024 21:57:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734645455; cv=none; b=RvJqM8nuJBfAzmfMqq0DTlV95C4r0WT62be7v7Y6VNWP1Tg9zvctpuTFX8Cqd2ibmAXYdTwiV+QwAgl6sA4CoE32eOhi+xBGvUhHqsJppBhzKPQUOwg/qZcXAnKufKYP1pxi9TLssYTlyFaXqrDKgyoDz5XFx/t31EY5t+6I8yU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734645455; c=relaxed/simple; bh=830D/Y0uwRU3gpc7bD/i0VBchE7RkXNBc/KlmRq5S2c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=en1HGB4WgPZOhjOkf5ZoXKzsdJlj2EhggTLZXXGFWlXU+IoYKig1oet1wPIpHcMiG5+X16WmH+N9lkpgJFLlwH5BkoHt1QAQsYQneviorYHKNJMQwCQwHalt/ec56l6nd5czVBlfPVE72vtBbsJii4GQsrsvcRNcUz0CQz9Nt6k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=S6romxGE; arc=none smtp.client-ip=209.85.160.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S6romxGE" Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-46783d44db0so11699251cf.1 for ; Thu, 19 Dec 2024 13:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734645453; x=1735250253; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=UgOKWEjuj4h1JgLFwVKltCYrXDDd1soimQNh2JEAfzo=; b=S6romxGEo9VnaXK+EW8kGRuo/ZTu3/4nGNlPx1XEWy/C5D57YKkkZbny2xtUFp9jqg EDwsozcii9SR549o9gVe2S5tUlsq0Zf4Bv1kHvsA2erWi+uwT5cnlWJeRdpEp8vVJl1E zk6VP6lVRBUEnthAeDtqEKl3/glYm621frr0uAdDWWzmLH59kOKE+wI3XmhBTHkIZY+B zN5i/V70t19ZdHsz4/gqozRuCpwQ3xUzBSD3NVI41KjhTYRpkg9izUVoPi4bs3sNQkRT 4En6KZm5HvWfcQqec1PuTpPRSbUB1vD/8aLk/oK0wMCvcf9gTdBHogTLusHBBI/Ffijz 3V9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734645453; x=1735250253; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UgOKWEjuj4h1JgLFwVKltCYrXDDd1soimQNh2JEAfzo=; b=s41ojQixBNuWYtrmnA++YZ5pNDVql474nGKDtzxgJs3Ah4ulbyu0XLAm3cvKMDsgoj NDP8Dw0KcAXq+96A+do++izVWaByMRygQEMuh0ZbogmA9V87+ZanRsq3wRdm2cQlCKhY ktV3KhZLNrt2G9YOryX/kH8bikSA/SpjRYph0Jge6nN5geS/tvfKpY3N8tphp2ynnhpt WHakBg6fkLF7T+mmIALnowSChquhyv08UbYGmCHBDiHyi5nAlcOLE14yIsljC7voZZkw bYsLxO0t0H3xnEDhEzVnpItdZLcnU1kE2fY9Fz0rk5gf57vQ476YfjmeYh6hNE/yprym MyZw== X-Gm-Message-State: AOJu0Yx02+GvsBZJH6H69xUsU96RKKG4CU8ulM4XSdctmHH/rgGC5iwW CtwxfBWz69gPPwcpzTPFU3WwkAGiaPrd9aH5RhQZQhTlj+B23Irx X-Gm-Gg: ASbGncspnIlGvTPjnkNm3Mb+RjUAnCk0pPUltDRuGHuWQDBPzfgb52Oaro8iMwI5lQA bcFDV8+VBYPxPApbJP6G85AaeA9mbw1hxdNslvA53yfM8GSKzV3j0JPUr/JV/gn8bKGUyyQuqLj JJSxrfYWp+7cq7lpIeOrIjTFYXZpyz3EDwxyE1rmBQETg4usikNIblpUtiQiGB5kPZ/RHZ1VHZi owEEsxBPr9AQEMHOB25d3GLHK3KYGKoIsZ0z9vymmqBCpTHkdVMqUNr8aEeHWAgiRjttxZ/Idr3 56UIftRt9k083YCLYTQxYwyAN5eIIPkw7g5X4iAZH98IsO8= X-Google-Smtp-Source: AGHT+IGBdHGCgeNshPJJKZC50TTfEiy645VHLxmD83MvdzSEJGrm5DB7mtec4EoaXeeO28cwrmDXkA== X-Received: by 2002:ac8:5a16:0:b0:467:75fa:8c9 with SMTP id d75a77b69052e-46a4a8b3472mr8974231cf.8.1734645452740; Thu, 19 Dec 2024 13:57:32 -0800 (PST) Received: from fauth-a2-smtp.messagingengine.com (fauth-a2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-46a3e6788b3sm10243841cf.26.2024.12.19.13.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 13:57:32 -0800 (PST) Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfauth.phl.internal (Postfix) with ESMTP id AB3481200043; Thu, 19 Dec 2024 16:57:31 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Thu, 19 Dec 2024 16:57:31 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddttddgudehvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddv necuhfhrohhmpeeuohhquhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilh drtghomheqnecuggftrfgrthhtvghrnhephedugfduffffteeutddvheeuveelvdfhleel ieevtdeguefhgeeuveeiudffiedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepsghoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghl ihhthidqieelvdeghedtieegqddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepgh hmrghilhdrtghomhesfhhigihmvgdrnhgrmhgvpdhnsggprhgtphhtthhopeduvddpmhho uggvpehsmhhtphhouhhtpdhrtghpthhtoheprghnughrihihrdhshhgvvhgthhgvnhhkoh eslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgv lhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehllhhvmheslhhishhtsh drlhhinhhugidruggvvhdprhgtphhtthhopehpvghtvghriiesihhnfhhrrgguvggrugdr ohhrghdprhgtphhtthhopehmihhnghhosehrvgguhhgrthdrtghomhdprhgtphhtthhope ifihhllheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhonhhgmhgrnhesrhgvughh rghtrdgtohhmpdhrtghpthhtohepnhgrthhhrghnsehkvghrnhgvlhdrohhrghdprhgtph htthhopehnuggvshgruhhlnhhivghrshesghhoohhglhgvrdgtohhm X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Dec 2024 16:57:31 -0500 (EST) Date: Thu, 19 Dec 2024 13:57:30 -0800 From: Boqun Feng To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Subject: Re: [PATCH v1 1/1] lockdep: Mark chain_hlock_class_idx() with __maybe_unused Message-ID: References: <20241209170810.1485183-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sun, Dec 15, 2024 at 11:21:36PM +0200, Andy Shevchenko wrote: > On Sun, Dec 15, 2024 at 11:55:08AM -0800, Boqun Feng wrote: > > On Mon, Dec 09, 2024 at 07:08:10PM +0200, Andy Shevchenko wrote: > > > When chain_hlock_class_idx() is unused, it prevents kernel builds with clang, > > > `make W=1` and CONFIG_WERROR=y: > > > > > > kernel/locking/lockdep.c:435:28: error: unused function 'chain_hlock_class_idx' [-Werror,-Wunused-function] > > > > > > Fix this by marking it with __maybe_unused. > > > > > > See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static > > > inline functions for W=1 build"). > > > > > > Signed-off-by: Andy Shevchenko > > > > This looks fine to me, so I'm going to queue it, but could you do me > > favor if you could share the exact configs that would make > > chain_hlock_class_idx() an unused fuction in kernel/locking/lockdep.c ? > > I might harvest this when I come from vacations (some around mid-January). > After some investigation myself, it turns out that chain_hlock_class_idx() is defined outside "#ifdef CONFIG_PROVING_LOCK", but only used under CONFIG_PROVING_LOCK=y, hence the unused warning. TBH, I feel we should really clean-up/consolidate those "#ifdef" to make internal definition/usage more clear. But nothing blocks this patch, it fixes a real issue, I will add the CONFIG_PROVING_LOCK part in the commit log. Thanks! Regards, Boqun > > I might add these information in commit log. > > > -- > With Best Regards, > Andy Shevchenko > >