Skip to content

Commit

Permalink
x86: simplify one-level sysctl registration for itmt_kern_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 f756270 commit 36657db
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions arch/x86/kernel/itmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,6 @@ static struct ctl_table itmt_kern_table[] = {
{}
};

static struct ctl_table itmt_root_table[] = {
{
.procname = "kernel",
.mode = 0555,
.child = itmt_kern_table,
},
{}
};

static struct ctl_table_header *itmt_sysctl_header;

/**
Expand Down Expand Up @@ -114,7 +105,7 @@ int sched_set_itmt_support(void)
return 0;
}

itmt_sysctl_header = register_sysctl_table(itmt_root_table);
itmt_sysctl_header = register_sysctl("kernel", itmt_kern_table);
if (!itmt_sysctl_header) {
mutex_unlock(&itmt_update_mutex);
return -ENOMEM;
Expand Down

0 comments on commit 36657db

Please sign in to comment.