Skip to content

Commit

Permalink
ppc: simplify one-level sysctl registration for nmi_wd_lpm_factor_ctl…
Browse files Browse the repository at this point in the history
…_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>
  • Loading branch information
Luis Chamberlain committed Mar 19, 2023
1 parent 77af581 commit 7385b7c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions arch/powerpc/platforms/pseries/mobility.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7385b7c

Please sign in to comment.