summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2023-03-11 15:39:41 -0800
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2023-04-11 12:44:49 -0400
commit17c6d0ce83406aebc98f8ce16c66f5416106963d (patch)
tree820aa2e20601db9e814b5c9a778e7811ee00a96c /net
parent39724217447fc3b3ca76ff6fd5086e26165ba6d8 (diff)
downloadlwn-17c6d0ce83406aebc98f8ce16c66f5416106963d.tar.gz
lwn-17c6d0ce83406aebc98f8ce16c66f5416106963d.zip
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@kernel.org> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/xprtrdma/transport.c11
1 files changed, 1 insertions, 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;
}