powerpc: Simplify sysctl registration for nmi_wd_lpm_factor_ctl_table
authorLuis Chamberlain <mcgrof@kernel.org>
Fri, 10 Mar 2023 23:28:50 +0000 (15:28 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 22 Mar 2023 12:21:36 +0000 (23:21 +1100)
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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230310232850.3960676-3-mcgrof@kernel.org
arch/powerpc/platforms/pseries/mobility.c

index 643d309d1bd052f2a37ee6bd2d5a2cec2e849054..7564e5d4253b3b55044ed549f0e44d771b675cce 100644 (file)
@@ -62,18 +62,10 @@ static struct ctl_table nmi_wd_lpm_factor_ctl_table[] = {
        },
        {}
 };
-static struct ctl_table nmi_wd_lpm_factor_sysctl_root[] = {
-       {
-               .procname       = "kernel",
-               .mode           = 0555,
-               .child          = nmi_wd_lpm_factor_ctl_table,
-       },
-       {}
-};
 
 static int __init register_nmi_wd_lpm_factor_sysctl(void)
 {
-       register_sysctl_table(nmi_wd_lpm_factor_sysctl_root);
+       register_sysctl("kernel", nmi_wd_lpm_factor_ctl_table);
 
        return 0;
 }