From: Luis Chamberlain Date: Sat, 11 Mar 2023 23:39:44 +0000 (-0800) Subject: sunrpc: simplify one-level sysctl registration for debug_table X-Git-Tag: v6.6.17~4964^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=703c6d03f165183b97526c182aa1d701b40f0453;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker --- 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