Skip to content

Commit

Permalink
x86: simplify one-level sysctl registration for abi_table2
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 7385b7c commit f756270
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions arch/x86/entry/vdso/vdso32-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,9 @@ static struct ctl_table abi_table2[] = {
{}
};

static struct ctl_table abi_root_table2[] = {
{
.procname = "abi",
.mode = 0555,
.child = abi_table2
},
{}
};

static __init int ia32_binfmt_init(void)
{
register_sysctl_table(abi_root_table2);
register_sysctl("abi", abi_table2);
return 0;
}
__initcall(ia32_binfmt_init);
Expand Down

0 comments on commit f756270

Please sign in to comment.