Thread (2 messages) read the whole thread 2 messages, 2 authors, 2026-06-02
COLD60d IN BPF-NEXT

Queued in bpf-next as c169a2a5fd9c on 2026-06-02.

[PATCH bpf-next 1/1] bpf: Silence unused-but-set-variable warning in bpf_for_each_reg_in_vstate_mask

From: Amery Hung <hidden>
Date: 2026-06-02 17:52:07
Also in: bpf
Subsystem: bpf [core], bpf [general] (safe dynamic programs and tools), the rest · Maintainers: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Eduard Zingerman, Kumar Kartikeya Dwivedi, Linus Torvalds

The macro requires callers to pass a stack variable, but not all
callbacks use it. Add (void)__stack to suppress the clang W=1 warning.

Signed-off-by: Amery Hung <redacted>
---
 include/linux/bpf_verifier.h | 1 +
 1 file changed, 1 insertion(+)
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
index 3dd2d21230af..c248ff41f42a 100644
--- a/include/linux/bpf_verifier.h
+++ b/include/linux/bpf_verifier.h
@@ -582,6 +582,7 @@ bpf_get_spilled_stack_arg(int slot, struct bpf_func_state *frame)
 				(void)(__expr);                          \
 			}						 \
 		}                                                        \
+		(void)__stack;                                           \
 	})
 
 /* Invoke __expr over regsiters in __vst, setting __state and __reg */
-- 
2.53.0-Meta
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help