bpf: Silence unused-but-set-variable warning in bpf_for_each_reg_in_vstate_mask
Subsystems (4)
PATCH 1/1 bpf: Silence unused-but-set-variable warning in bpf_for_each_reg_in_vstate_mask
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 <[email protected]>
--- include/linux/bpf_verifier.h | 1 + 1 file changed, 1 insertion(+)
include/linux/bpf_verifier.h +1 -0
@@ -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 */
Signature · 1 line
2.53.0-Meta
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Quoted 7 lines · On Tue, 2 Jun 2026 10:52:04 -0700 you wrote:
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 <[email protected]>--- include/linux/bpf_verifier.h | 1 + 1 file changed, 1 insertion(+)
Here is the summary with links:
- [bpf-next,1/1] bpf: Silence unused-but-set-variable warning in bpf_for_each_reg_in_vstate_mask
https://git.kernel.org/bpf/bpf-next/c/c169a2a5fd9c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html