sst-linux/net/sunrpc
Arnd Bergmann ddb610241b sunrpc: suppress warnings for unused procfs functions
[ Upstream commit 1f7a4f98c11fbeb18ed21f3b3a497e90a50ad2e0 ]

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: dbf847ecb6 ("knfsd: allow cache_register to return error on failure")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-07 16:56:42 +01:00
..
auth_gss
xprtrdma svcrdma: fix miss destroy percpu_counter in svc_rdma_proc_init() 2024-12-14 19:53:47 +01:00
addr.c
auth_null.c
auth_unix.c
auth.c
backchannel_rqst.c
cache.c sunrpc: suppress warnings for unused procfs functions 2025-03-07 16:56:42 +01:00
clnt.c SUNRPC: avoid soft lockup when transmitting UDP to reachable server. 2024-08-03 08:49:15 +02:00
debugfs.c
fail.h
Kconfig
Makefile
netns.h
rpc_pipe.c
rpcb_clnt.c
sched.c SUNRPC: Prevent looping due to rpc_signal_task() races 2025-03-07 16:56:42 +01:00
socklib.c
socklib.h
stats.c sunrpc: use the struct net as the svc proc private 2024-08-19 06:00:05 +02:00
sunrpc_syms.c
sunrpc.h
svc_xprt.c
svc.c sunrpc: pass in the sv_stats struct through svc_create_pooled 2024-08-19 06:00:04 +02:00
svcauth_unix.c
svcauth.c
svcsock.c
sysctl.c
sysfs.c
sysfs.h
timer.c
xdr.c
xprt.c
xprtmultipath.c
xprtsock.c sunrpc: clear XPRT_SOCK_UPD_TIMEOUT when reset transport 2024-12-14 19:54:09 +01:00