Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/bpf/20220826035141.737919-1-james.hilliard1@gmail.com

authored by

James Hilliard and committed by
Andrii Nakryiko
b05d64ef ab9ac19c

+1 -1
+1 -1
tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c
··· 19 19 int count = 0; 20 20 int noise = 0; 21 21 22 - __always_inline int subprog_noise(void) 22 + static __always_inline int subprog_noise(void) 23 23 { 24 24 __u32 key = 0; 25 25