* [PATCH] sunrpc: wrap debug symobls with CONFIG_SUNRPC_DEBUG
@ 2023-07-28 14:57 Min-Hua Chen
2023-07-30 15:38 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Min-Hua Chen @ 2023-07-28 14:57 UTC (permalink / raw)
To: Trond Myklebust, Anna Schumaker, Chuck Lever, Jeff Layton,
Neil Brown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Min-Hua Chen, linux-nfs, netdev, linux-kernel
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?
Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
---
net/sunrpc/sysctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 93941ab12549..887bdeae3c89 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -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)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sunrpc: wrap debug symobls with CONFIG_SUNRPC_DEBUG
2023-07-28 14:57 [PATCH] sunrpc: wrap debug symobls with CONFIG_SUNRPC_DEBUG Min-Hua Chen
@ 2023-07-30 15:38 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2023-07-30 15:38 UTC (permalink / raw)
To: Min-Hua Chen
Cc: Trond Myklebust, Anna Schumaker, Chuck Lever, Jeff Layton,
Neil Brown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-nfs, netdev, linux-kernel
On Fri, Jul 28, 2023 at 10:57:50PM +0800, Min-Hua Chen wrote:
> 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?
>
> Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-30 15:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 14:57 [PATCH] sunrpc: wrap debug symobls with CONFIG_SUNRPC_DEBUG Min-Hua Chen
2023-07-30 15:38 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).