Skip to content

Commit 89d7971

Browse files
mcgrofhansendc
authored andcommitted
x86: Simplify one-level sysctl registration for itmt_kern_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> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20230310233248.3965389-3-mcgrof%40kernel.org
1 parent 3f6cc47 commit 89d7971

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

arch/x86/kernel/itmt.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,6 @@ static struct ctl_table itmt_kern_table[] = {
7777
{}
7878
};
7979

80-
static struct ctl_table itmt_root_table[] = {
81-
{
82-
.procname = "kernel",
83-
.mode = 0555,
84-
.child = itmt_kern_table,
85-
},
86-
{}
87-
};
88-
8980
static struct ctl_table_header *itmt_sysctl_header;
9081

9182
/**
@@ -114,7 +105,7 @@ int sched_set_itmt_support(void)
114105
return 0;
115106
}
116107

117-
itmt_sysctl_header = register_sysctl_table(itmt_root_table);
108+
itmt_sysctl_header = register_sysctl("kernel", itmt_kern_table);
118109
if (!itmt_sysctl_header) {
119110
mutex_unlock(&itmt_update_mutex);
120111
return -ENOMEM;

0 commit comments

Comments
 (0)