mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sunrpc: rpc_debug and others are defined even if CONFIG_SUNRPC_DEBUG unset
@ 2026-01-06 17:37 Ben Dooks
  0 siblings, 0 replies; only message in thread
From: Ben Dooks @ 2026-01-06 17:37 UTC (permalink / raw)
  To: linux-kernel, linux-nfs; +Cc: jlayton, chuck.lever, anna, trondmy, Ben Dooks

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>
---
 include/linux/sunrpc/debug.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index 891f6173c951..eb4bd62df319 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -14,12 +14,10 @@
 /*
  * 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__)
-- 
2.37.2.352.g3c44437643


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-06 17:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-06 17:37 [PATCH] sunrpc: rpc_debug and others are defined even if CONFIG_SUNRPC_DEBUG unset Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®