lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250227180753.GI1615191@kernel.org>
Date: Thu, 27 Feb 2025 18:07:53 +0000
From: Simon Horman <horms@...nel.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Trond Myklebust <trondmy@...nel.org>, Anna Schumaker <anna@...nel.org>,
	Chuck Lever <chuck.lever@...cle.com>,
	Jeff Layton <jlayton@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	NeilBrown <neilb@...e.de>, "J. Bruce Fields" <bfields@...ldses.org>,
	Arnd Bergmann <arnd@...db.de>,
	Olga Kornievskaia <okorniev@...hat.com>,
	Dai Ngo <Dai.Ngo@...cle.com>, Tom Talpey <tom@...pey.com>,
	Yang Erkun <yangerkun@...wei.com>, linux-nfs@...r.kernel.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RESEND] sunrpc: suppress warnings for unused procfs
 functions

On Tue, Feb 25, 2025 at 03:52:21PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> There is a warning about unused variables when building with W=1 and no procfs:
> 
> net/sunrpc/cache.c:1660:30: error: 'cache_flush_proc_ops' defined but not used [-Werror=unused-const-variable=]
>  1660 | static const struct proc_ops cache_flush_proc_ops = {
>       |                              ^~~~~~~~~~~~~~~~~~~~
> net/sunrpc/cache.c:1622:30: error: 'content_proc_ops' defined but not used [-Werror=unused-const-variable=]
>  1622 | static const struct proc_ops content_proc_ops = {
>       |                              ^~~~~~~~~~~~~~~~
> net/sunrpc/cache.c:1598:30: error: 'cache_channel_proc_ops' defined but not used [-Werror=unused-const-variable=]
>  1598 | static const struct proc_ops cache_channel_proc_ops = {
>       |                              ^~~~~~~~~~~~~~~~~~~~~~
> 
> These are used inside of an #ifdef, so replacing that with an
> IS_ENABLED() check lets the compiler see how they are used while
> still dropping them during dead code elimination.
> 
> Fixes: dbf847ecb631 ("knfsd: allow cache_register to return error on failure")
> Reviewed-by: Jeff Layton <jlayton@...nel.org>
> Acked-by: Chuck Lever <chuck.lever@...cle.com>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> This patch from last year is still needed, resending without changes

Tested-by: Simon Horman <horms@...nel.org> # build-tested
Reviewed-by: Simon Horman <horms@...nel.org>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ