selftests/bpf: fix unused attribute usage in subprogs_unused test
Subsystems (5)
Andrii Nakryiko
maintainerPATCH 1/1 selftests/bpf: fix unused attribute usage in subprogs_unused test
Correct attribute name is "unused". maybe_unused is a C++17 addition. This patch fixes compilation warning during selftests compilation.
Fixes 197afc631413 ("libbpf: Don't attempt to load unused subprog as an entry-point BPF program")
Signed-off-by Andrii Nakryiko <[email protected]>
--- tools/testing/selftests/bpf/progs/test_subprogs_unused.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/progs/test_subprogs_unused.c +2 -2
@@ -4,12 +4,12 @@ const char LICENSE[] SEC("license") = "GPL"; -__attribute__((maybe_unused)) __noinline int unused1(int x) +__attribute__((unused)) __noinline int unused1(int x) {return x +1 ; } -static __attribute__((maybe_unused)) __noinline int unused2(int x) +static __attribute__((unused)) __noinline int unused2(int x) {return x +2 ; }
Signature · 1 line
2.24.1
This patch was applied to bpf/bpf.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf.git (refs/heads/master):
Quoted 8 lines · On Wed, 11 Nov 2020 15:12:15 -0800 you wrote:
Correct attribute name is "unused".
maybe_unusedis a C++17 addition. This patch fixes compilation warning during selftests compilation.Fixes 197afc631413 ("libbpf: Don't attempt to load unused subprog as an entry-point BPF program")Signed-off-by Andrii Nakryiko <[email protected]>--- tools/testing/selftests/bpf/progs/test_subprogs_unused.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Here is the summary with links:
- [bpf] selftests/bpf: fix unused attribute usage in subprogs_unused test
https://git.kernel.org/bpf/bpf/c/fd63729cc0a6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html