Skip to content

Commit

Permalink
ia64: simplify one-level sysctl registration for kdump_ctl_table
Browse files Browse the repository at this point in the history
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 4abb17d commit 8d3f311
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions arch/ia64/kernel/crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,6 @@ static struct ctl_table kdump_ctl_table[] = {
},
{ }
};

static struct ctl_table sys_table[] = {
{
.procname = "kernel",
.mode = 0555,
.child = kdump_ctl_table,
},
{ }
};
#endif

static int
Expand All @@ -257,7 +248,7 @@ machine_crash_setup(void)
if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
return ret;
#ifdef CONFIG_SYSCTL
register_sysctl_table(sys_table);
register_sysctl("kernel", kdump_ctl_table);
#endif
return 0;
}
Expand Down

0 comments on commit 8d3f311

Please sign in to comment.