Message ID | 20231107-jag-sysctl_remove_empty_elem_kernel-v1-3-e4ce1388dfa0@samsung.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [01/10] kernel misc: Remove the now superfluous sentinel elements from ctl_table array | expand |
On Tue, 07 Nov 2023 14:45:03 +0100 Joel Granados via B4 Relay <devnull+j.granados.samsung.com@kernel.org> wrote: > From: Joel Granados <j.granados@samsung.com> > > This commit comes at the tail end of a greater effort to remove the > empty elements at the end of the ctl_table arrays (sentinels) which > will reduce the overall build time size of the kernel and run time > memory bloat by ~64 bytes per sentinel (further information Link : > https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) > > Remove sentinel elements from ftrace_sysctls and user_event_sysctls > Both looks good to me. (since register_sysctl_init() uses ARRAY_SIZE() macro to get the array size.) Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> > Signed-off-by: Joel Granados <j.granados@samsung.com> > --- > kernel/trace/ftrace.c | 1 - > kernel/trace/trace_events_user.c | 1 - > 2 files changed, 2 deletions(-) > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index 8de8bec5f366..fd40d02a23c7 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -8264,7 +8264,6 @@ static struct ctl_table ftrace_sysctls[] = { > .mode = 0644, > .proc_handler = ftrace_enable_sysctl, > }, > - {} > }; > > static int __init ftrace_sysctl_init(void) > diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c > index 6f046650e527..bef1bdc62acf 100644 > --- a/kernel/trace/trace_events_user.c > +++ b/kernel/trace/trace_events_user.c > @@ -2694,7 +2694,6 @@ static struct ctl_table user_event_sysctls[] = { > .mode = 0644, > .proc_handler = set_max_user_events_sysctl, > }, > - {} > }; > > static int __init trace_events_user_init(void) > > -- > 2.30.2 >
On Wed, 8 Nov 2023 19:29:49 +0900 Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote: > On Tue, 07 Nov 2023 14:45:03 +0100 > Joel Granados via B4 Relay <devnull+j.granados.samsung.com@kernel.org> wrote: > > > From: Joel Granados <j.granados@samsung.com> > > > > This commit comes at the tail end of a greater effort to remove the > > empty elements at the end of the ctl_table arrays (sentinels) which > > will reduce the overall build time size of the kernel and run time > > memory bloat by ~64 bytes per sentinel (further information Link : > > https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) > > > > Remove sentinel elements from ftrace_sysctls and user_event_sysctls > > > > Both looks good to me. (since register_sysctl_init() uses ARRAY_SIZE() > macro to get the array size.) > > Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Agreed. Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> -- Steve
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 8de8bec5f366..fd40d02a23c7 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -8264,7 +8264,6 @@ static struct ctl_table ftrace_sysctls[] = { .mode = 0644, .proc_handler = ftrace_enable_sysctl, }, - {} }; static int __init ftrace_sysctl_init(void) diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c index 6f046650e527..bef1bdc62acf 100644 --- a/kernel/trace/trace_events_user.c +++ b/kernel/trace/trace_events_user.c @@ -2694,7 +2694,6 @@ static struct ctl_table user_event_sysctls[] = { .mode = 0644, .proc_handler = set_max_user_events_sysctl, }, - {} }; static int __init trace_events_user_init(void)