Skip to content

Commit d8c0418

Browse files
mcgroftorvalds
authored andcommitted
kernel/sysctl.c: rename sysctl_init() to sysctl_init_bases()
Rename sysctl_init() to sysctl_init_bases() so to reflect exactly what this is doing. Link: https://lkml.kernel.org/r/20211129211943.640266-4-mcgrof@kernel.org Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Cc: Antti Palosaari <crope@iki.fi> Cc: Christian Brauner <christian.brauner@ubuntu.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Eric Biggers <ebiggers@google.com> Cc: Iurii Zaikin <yzaikin@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: Lukas Middendorf <kernel@tuxforce.de> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com> Cc: Stephen Kitt <steve@sk2.org> Cc: Xiaoming Ni <nixiaoming@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent ab171b9 commit d8c0418

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

arch/arm/mm/alignment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ static int __init noalign_setup(char *__unused)
10051005
__setup("noalign", noalign_setup);
10061006

10071007
/*
1008-
* This needs to be done after sysctl_init, otherwise sys/ will be
1008+
* This needs to be done after sysctl_init_bases(), otherwise sys/ will be
10091009
* overwritten. Actually, this shouldn't be in sys/ at all since
10101010
* it isn't a sysctl, and it doesn't contain sysctl information.
10111011
* We now locate it in /proc/cpu/alignment instead.

arch/sh/mm/alignment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static const struct proc_ops alignment_proc_ops = {
161161
};
162162

163163
/*
164-
* This needs to be done after sysctl_init, otherwise sys/ will be
164+
* This needs to be done after sysctl_init_bases(), otherwise sys/ will be
165165
* overwritten. Actually, this shouldn't be in sys/ at all since
166166
* it isn't a sysctl, and it doesn't contain sysctl information.
167167
* We now locate it in /proc/cpu/alignment instead.

fs/proc/proc_sysctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ EXPORT_SYMBOL(register_sysctl);
14191419
* Context: Can only be called after your respective sysctl base path has been
14201420
* registered. So for instance, most base directories are registered early on
14211421
* init before init levels are processed through proc_sys_init() and
1422-
* sysctl_init().
1422+
* sysctl_init_bases().
14231423
*/
14241424
void __init __register_sysctl_init(const char *path, struct ctl_table *table,
14251425
const char *table_name)
@@ -1768,7 +1768,7 @@ int __init proc_sys_init(void)
17681768
proc_sys_root->proc_dir_ops = &proc_sys_dir_file_operations;
17691769
proc_sys_root->nlink = 0;
17701770

1771-
return sysctl_init();
1771+
return sysctl_init_bases();
17721772
}
17731773

17741774
struct sysctl_alias {

include/linux/sysctl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
228228

229229
void unregister_sysctl_table(struct ctl_table_header * table);
230230

231-
extern int sysctl_init(void);
231+
extern int sysctl_init_bases(void);
232232
extern void __register_sysctl_init(const char *path, struct ctl_table *table,
233233
const char *table_name);
234234
#define register_sysctl_init(path, table) __register_sysctl_init(path, table, #table)

kernel/sysctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2844,7 +2844,7 @@ DECLARE_SYSCTL_BASE(vm, vm_table);
28442844
DECLARE_SYSCTL_BASE(debug, debug_table);
28452845
DECLARE_SYSCTL_BASE(dev, dev_table);
28462846

2847-
int __init sysctl_init(void)
2847+
int __init sysctl_init_bases(void)
28482848
{
28492849
register_sysctl_base(kernel);
28502850
register_sysctl_base(vm);

0 commit comments

Comments
 (0)