Home
last modified time | relevance | path

Searched hist:"713461 b8" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dbpf_misc.h713461b8 Wed Mar 08 23:40:13 CST 2023 Andrii Nakryiko <andrii@kernel.org> selftests/bpf: add __sink() macro to fake variable consumption

Add __sink(expr) macro that forces compiler to believe that passed in
expression is both read and written. It used a simple embedded asm for
this. This is useful in a lot of tests where we assign value to some variable
to trigger some action, but later don't read variable, causing compiler
to complain (if corresponding compiler warnings are turned on, which
we'll do in the next patch).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230309054015.4068562-3-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>