diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2023-03-10 01:24:10 -0800 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-04-13 11:49:35 -0700 |
commit | 3d51cd8ea3c832c50c22e46354ac89e0964ea2d8 (patch) | |
tree | 54d945266bfc4700cd2701a5c22999644a4a2160 /kernel/utsname_sysctl.c | |
parent | 02148ff371b276d664780de6d1f52d52074c3e25 (diff) | |
download | lwn-3d51cd8ea3c832c50c22e46354ac89e0964ea2d8.tar.gz lwn-3d51cd8ea3c832c50c22e46354ac89e0964ea2d8.zip |
utsname: simplify one-level sysctl registration for uts_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.
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/utsname_sysctl.c')
-rw-r--r-- | kernel/utsname_sysctl.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c index f50398cb790d..019e3a1566cf 100644 --- a/kernel/utsname_sysctl.c +++ b/kernel/utsname_sysctl.c @@ -123,15 +123,6 @@ static struct ctl_table uts_kern_table[] = { {} }; -static struct ctl_table uts_root_table[] = { - { - .procname = "kernel", - .mode = 0555, - .child = uts_kern_table, - }, - {} -}; - #ifdef CONFIG_PROC_SYSCTL /* * Notify userspace about a change in a certain entry of uts_kern_table, @@ -147,7 +138,7 @@ void uts_proc_notify(enum uts_proc proc) static int __init utsname_sysctl_init(void) { - register_sysctl_table(uts_root_table); + register_sysctl("kernel", uts_kern_table); return 0; } |