summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Nelson-Moore <enelsonmoore@gmail.com>2026-09-17 23:23:38 -0700
committerJoel Granados <joel.granados@kernel.org>2026-09-25 14:00:00 +0200
commit6d8dc12317c2df7e09e7e3d02413490401a3ea31 (patch)
tree735dcdc0acc795f2f41f354abbeb77123f558a67
parent238dfe02fb0a9f72d7fd275d74ce80f13923ef31 (diff)
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>
-rw-r--r--fs/proc/proc_sysctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 04a382178c65..d0d76c31d330 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -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;