diff mbox series

[5/5] sunrpc: simplify one-level sysctl registration for debug_table

Message ID 20230310225236.3939443-6-mcgrof@kernel.org (mailing list archive)
State New, archived
Headers show
Series sunrpc: simplfy sysctl registrations | expand

Commit Message

Luis Chamberlain March 10, 2023, 10:52 p.m. UTC
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>
---
 net/sunrpc/sysctl.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 4120797bf740..8000828b139f 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -80,21 +80,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