Commit b05d64ef authored by James Hilliard's avatar James Hilliard Committed by Andrii Nakryiko

selftests/bpf: Declare subprog_noise as static in tailcall_bpf2bpf4

Due to bpf_map_lookup_elem being declared static we need to also
declare subprog_noise as static.

Fixes the following error:
progs/tailcall_bpf2bpf4.c:26:9: error: 'bpf_map_lookup_elem' is static but used in inline function 'subprog_noise' which is not static [-Werror]
   26 |         bpf_map_lookup_elem(&nop_table, &key);
      |         ^~~~~~~~~~~~~~~~~~~
Signed-off-by: default avatarJames Hilliard <james.hilliard1@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarSong Liu <song@kernel.org>
Link: https://lore.kernel.org/bpf/20220826035141.737919-1-james.hilliard1@gmail.com
parent ab9ac19c
......@@ -19,7 +19,7 @@ struct {
int count = 0;
int noise = 0;
__always_inline int subprog_noise(void)
static __always_inline int subprog_noise(void)
{
__u32 key = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment