utsname: simplify one-level sysctl registration for uts_kern_table
PATCH 1/1 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.
---
This is part of the effort to phase out calls that can recurse from sysctl registration [0]. If you have a tree to take this in feel free to take it, or I can take it too through sysclt-next. Let me know!
This file has no explicit maintainer, so I assume there is no tree.
If I so no one taking it I can take in as part of sysctl-next later.
[0] https://lore.kernel.org/all/[email protected]/T/#u
kernel/utsname_sysctl.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
kernel/utsname_sysctl.c +1 -10
@@ -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 ; }
Signature · 1 line
2.39.1
Quoted 6 lines · Luis Chamberlain
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 <[email protected]>
Quoted 9 lines
---
This is part of the effort to phase out calls that can recurse from sysctl registration [0]. If you have a tree to take this in feel free to take it, or I can take it too through sysclt-next. Let me know!
This file has no explicit maintainer, so I assume there is no tree.
If I so no one taking it I can take in as part of sysctl-next later.
I recommend taking it in your tree like this, thanks.
greg k-h
Quoted 5 lines · On Fri, 10 Mar 2023 15:16:56 -0800 Luis Chamberlain <[email protected]> wrote:
This is part of the effort to phase out calls that can recurse from sysctl registration [0]. If you have a tree to take this in feel free to take it, or I can take it too through sysclt-next. Let me know!
This file has no explicit maintainer, so I assume there is no tree.
I act as a backstop for such changes, if people cc me.
Quoted 1 line
If I so no one taking it I can take in as part of sysctl-next later.
Please do that.
Quoted 7 lines · Luis Chamberlain
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 <[email protected]>---
Looks good,