* [PATCH] selftests/bpf: declare subprog_noise as static in tailcall_bpf2bpf4
@ 2022-08-26 3:51 James Hilliard
2022-08-26 4:44 ` Song Liu
2022-08-27 5:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: James Hilliard @ 2022-08-26 3:51 UTC (permalink / raw)
To: bpf
Cc: James Hilliard, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Mykola Lysenko, Shuah Khan, linux-kselftest, linux-kernel
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>
---
tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c b/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c
index b67e8022d500..a017d6b2f1dd 100644
--- a/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c
+++ b/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c
@@ -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;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/bpf: declare subprog_noise as static in tailcall_bpf2bpf4
2022-08-26 3:51 [PATCH] selftests/bpf: declare subprog_noise as static in tailcall_bpf2bpf4 James Hilliard
@ 2022-08-26 4:44 ` Song Liu
2022-08-27 5:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Song Liu @ 2022-08-26 4:44 UTC (permalink / raw)
To: James Hilliard
Cc: bpf, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Yonghong Song, John Fastabend, KP Singh,
Stanislav Fomichev, Hao Luo, Jiri Olsa, Mykola Lysenko,
Shuah Khan, linux-kselftest, open list
On Thu, Aug 25, 2022 at 8:52 PM James Hilliard
<james.hilliard1@gmail.com> wrote:
>
> 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>
Acked-by: Song Liu <song@kernel.org>
> ---
> tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c b/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c
> index b67e8022d500..a017d6b2f1dd 100644
> --- a/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c
> +++ b/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c
> @@ -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;
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/bpf: declare subprog_noise as static in tailcall_bpf2bpf4
2022-08-26 3:51 [PATCH] selftests/bpf: declare subprog_noise as static in tailcall_bpf2bpf4 James Hilliard
2022-08-26 4:44 ` Song Liu
@ 2022-08-27 5:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-08-27 5:10 UTC (permalink / raw)
To: James Hilliard
Cc: bpf, ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
kpsingh, sdf, haoluo, jolsa, mykolal, shuah, linux-kselftest,
linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Thu, 25 Aug 2022 21:51:39 -0600 you wrote:
> 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);
> | ^~~~~~~~~~~~~~~~~~~
>
> [...]
Here is the summary with links:
- selftests/bpf: declare subprog_noise as static in tailcall_bpf2bpf4
https://git.kernel.org/bpf/bpf-next/c/b05d64efbb21
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-27 5:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 3:51 [PATCH] selftests/bpf: declare subprog_noise as static in tailcall_bpf2bpf4 James Hilliard
2022-08-26 4:44 ` Song Liu
2022-08-27 5:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).