]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sunrpc: rpc_debug and others are defined even if CONFIG_SUNRPC_DEBUG unset
authorBen Dooks <ben.dooks@codethink.co.uk>
Tue, 6 Jan 2026 17:37:45 +0000 (17:37 +0000)
committerAnna Schumaker <anna.schumaker@oracle.com>
Mon, 9 Feb 2026 19:24:19 +0000 (14:24 -0500)
The rpc_debug, nfs_debug, nfsd_debug and nlm_debug are exported
even if CONFIG_SUNRPC_DEBUG is not set. This means that the
debug header should also define these to remove the following
sparse warnings:

net/sunrpc/sysctl.c:29:17: warning: symbol 'rpc_debug' was not declared. Should it be static?
net/sunrpc/sysctl.c:32:17: warning: symbol 'nfs_debug' was not declared. Should it be static?
net/sunrpc/sysctl.c:35:17: warning: symbol 'nfsd_debug' was not declared. Should it be static?
net/sunrpc/sysctl.c:38:17: warning: symbol 'nlm_debug' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
include/linux/sunrpc/debug.h

index 891f6173c951a6644018237017c845d81b42aa76..eb4bd62df3190c77299724f00cd37d0a8e89deb4 100644 (file)
 /*
  * Debugging macros etc
  */
-#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
 extern unsigned int            rpc_debug;
 extern unsigned int            nfs_debug;
 extern unsigned int            nfsd_debug;
 extern unsigned int            nlm_debug;
-#endif
 
 #define dprintk(fmt, ...)                                              \
        dfprintk(FACILITY, fmt, ##__VA_ARGS__)