Re: [PATCH] treewide: const qualify ctl_tables where applicable

From: Steven Rostedt
Date: Thu Jan 09 2025 - 09:49:39 EST


On Thu, 09 Jan 2025 14:16:39 +0100
Joel Granados <joel.granados@xxxxxxxxxx> wrote:

> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 2e113f8b13a2..489cbab3d64c 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -8786,7 +8786,7 @@ ftrace_enable_sysctl(const struct ctl_table *table, int write,
> return ret;
> }
>
> -static struct ctl_table ftrace_sysctls[] = {
> +static const struct ctl_table ftrace_sysctls[] = {
> {
> .procname = "ftrace_enabled",
> .data = &ftrace_enabled,
> diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
> index 17bcad8f79de..97325fbd6283 100644
> --- a/kernel/trace/trace_events_user.c
> +++ b/kernel/trace/trace_events_user.c
> @@ -2899,7 +2899,7 @@ static int set_max_user_events_sysctl(const struct ctl_table *table, int write,
> return ret;
> }
>
> -static struct ctl_table user_event_sysctls[] = {
> +static const struct ctl_table user_event_sysctls[] = {
> {
> .procname = "user_events_max",
> .data = &max_user_events,

Acked-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> # for kernel/trace/

-- Steve