sysctl: quiet unused variable warning in fs/proc/proc_sysctl.c:init_header()

The init_header() function uses list_for_each_table_entry() without
using the entry argument. This causes a warning when building with W=1.
Since the code is correct, mark the associated variable as
__maybe_unused.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Signed-off-by: Joel Granados <joel.granados@kernel.org>
This commit is contained in:
Ethan Nelson-Moore 2026-09-17 23:23:38 -07:00 committed by Joel Granados
parent 238dfe02fb
commit 6d8dc12317

View File

@ -206,7 +206,7 @@ static void init_header(struct ctl_table_header *head,
head->node = node;
INIT_HLIST_HEAD(&head->inodes);
if (node) {
const struct ctl_table *entry;
const struct ctl_table *entry __maybe_unused;
list_for_each_table_entry(entry, head) {
node->header = head;