[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230311233944.354858-3-mcgrof@kernel.org>
Date: Sat, 11 Mar 2023 15:39:41 -0800
From: Luis Chamberlain <mcgrof@...nel.org>
To: chuck.lever@...cle.com, jlayton@...nel.org,
trond.myklebust@...merspace.com, anna@...nel.org,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
kuba@...nel.org, linux-nfs@...r.kernel.org
Cc: ebiederm@...ssion.com, keescook@...omium.org, yzaikin@...gle.com,
j.granados@...sung.com, patches@...ts.linux.dev,
linux-fsdevel@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Luis Chamberlain <mcgrof@...nel.org>
Subject: [PATCH v3 2/5] sunrpc: simplify one-level sysctl registration for xr_tunables_table
There is no need to declare an extra tables to just create directory,
this can be easily be done with a prefix path with register_sysctl().
Simplify this registration.
Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
---
net/sunrpc/xprtrdma/transport.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index 10bb2b929c6d..29b0562d62e7 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -140,15 +140,6 @@ static struct ctl_table xr_tunables_table[] = {
{ },
};
-static struct ctl_table sunrpc_table[] = {
- {
- .procname = "sunrpc",
- .mode = 0555,
- .child = xr_tunables_table
- },
- { },
-};
-
#endif
static const struct rpc_xprt_ops xprt_rdma_procs;
@@ -799,7 +790,7 @@ int xprt_rdma_init(void)
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
if (!sunrpc_table_header)
- sunrpc_table_header = register_sysctl_table(sunrpc_table);
+ sunrpc_table_header = register_sysctl("sunrpc", xr_tunables_table);
#endif
return 0;
}
--
2.39.1
Powered by blists - more mailing lists