[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ndckw7vr5zxiz2olstjaxxk4a6qgrnbo65rex4242u3swnvvhm@whxmilgtgoyd>
Date: Wed, 9 Jul 2025 11:29:37 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Feng Tang <feng.tang@...ux.alibaba.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] panic: add 'panic_sys_info' sysctl to take human
readable string parameter
Hi,
[..]
>+#ifdef CONFIG_SYSCTL
> +
> +static const char sys_info_avail[] = "tasks,mem,timers,locks,ftrace,all_bt,blocked_tasks";
> +
> +int sysctl_sys_info_handler(const struct ctl_table *ro_table, int write,
> + void *buffer, size_t *lenp,
> + loff_t *ppos)
> +{
> + char names[sizeof(sys_info_avail) + 1];
> + struct ctl_table table;
> + unsigned long *si_bits_global;
> +
> + si_bits_global = ro_table->data;
[..]
Somehow this breaks the build with:
lib/sys_info.c:52:19: error: variable 'sys_info_avail' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
52 | static const char sys_info_avail[] = "tasks,mem,timers,locks,ftrace,all_bt,blocked_tasks";
| ^~~~~~~~~~~~~~
Moving sys_info_avail[] inside sysctl_sys_info_handler() seems to help.
Powered by blists - more mailing lists