Skip to contentSkip to conversation

sunrpc: wrap debug symobls with CONFIG_SUNRPC_DEBUG

PATCH In review Min-Hua Chen 2 participants 2 messages Jul 28, 2023 – Jul 30, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunrpc: wrap debug symobls with CONFIG_SUNRPC_DEBUG

rpc_debug, nfs_debug, nfsd_debug, and nlm_debug are used if CONFIG_SUNRPC_DEBUG is set. Wrap them with CONFIG_SUNRPC_DEBUG and fix the following sparse warnings:

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

---
 net/sunrpc/sysctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/sunrpc/sysctl.c +2 -2
index 93941ab12549..887bdeae3c89 100644
@@ -23,6 +23,8 @@
 
 #include "netns.h"
 
+#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
+
 /*
  * Declare the debug flags here
  */
@@ -38,8 +40,6 @@ EXPORT_SYMBOL_GPL(nfsd_debug);
 unsigned int	nlm_debug;
 EXPORT_SYMBOL_GPL(nlm_debug);
 
-#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
-
 static int proc_do_xprt(struct ctl_table *table, int write,
 			void *buffer, size_t *lenp, loff_t *ppos)
 {
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Min-Hua Chen

rpc_debug, nfs_debug, nfsd_debug, and nlm_debug are used if CONFIG_SUNRPC_DEBUG is set. Wrap them with CONFIG_SUNRPC_DEBUG and fix the following sparse warnings:

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