summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2023-03-11 15:39:44 -0800
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2023-04-11 12:45:19 -0400
commit703c6d03f165183b97526c182aa1d701b40f0453 (patch)
tree4aa80873c2f0424499a354465020dd82d9b8216e
parent32e356be32b6676d2d641ed4a4fe088c6d211d92 (diff)
sunrpc: simplify one-level sysctl registration for debug_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>
-rw-r--r--net/sunrpc/sysctl.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index afdfcc5403af..93941ab12549 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -163,20 +163,11 @@ static struct ctl_table debug_table[] = {
{ }
};
-static struct ctl_table sunrpc_table[] = {
- {
- .procname = "sunrpc",
- .mode = 0555,
- .child = debug_table
- },
- { }
-};
-
void
rpc_register_sysctl(void)
{
if (!sunrpc_table_header)
- sunrpc_table_header = register_sysctl_table(sunrpc_table);
+ sunrpc_table_header = register_sysctl("sunrpc", debug_table);
}
void