bpf, libbpf: Avoid unused function warning on bpf_tail_call_static
Subsystems (5)
PATCH 1/2 bpf, libbpf: Avoid unused function warning on bpf_tail_call_static
Add inline to __always_inline making it match the linux/compiler.h. Adding this avoids an unused function warning on bpf_tail_call_static when compining with -Wall.
--- tools/lib/bpf/bpf_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/bpf_helpers.h +1 -1
@@ -30,7 +30,7 @@#define SEC (NAME ) __attribute__((section(NAME), used))#ifndef __always_inline -#define __always_inline __attribute__((always_inline)) +#define __always_inline inline __attribute__((always_inline))#endif #ifndef __noinline#define __noinline __attribute__((noinline))
Signature · 1 line
2.30.0.284.gd98b1dd5eaa7-goog
Quoted 5 lines · Ian Rogers
Add inline to
__always_inlinemaking it match thelinux/compiler.h. Adding this avoids an unused function warning onbpf_tail_call_staticwhen compining with -Wall.Signed-off-by Ian Rogers <[email protected]>
PATCH 2/2 tools/bpftool: Add -Wall when building BPF programs
In reply to Ian RogersNo additional warnings are generated by enabling this, but having it enabled will help avoid regressions.
--- tools/bpf/bpftool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/bpf/bpftool/Makefile +1 -1
@@ -166,7 +166,7 @@ $(OUTPUT)%.bpf.o: skeleton/%.bpf.c $(OUTPUT)vmlinux.h $(LIBBPF) -I$(srctree)/tools/include/uapi/ \ -I$(LIBBPF_PATH) \ -I$(srctree)/tools/lib \ - -g -O2 -target bpf -c $< -o $@ && $(LLVM_STRIP) -g $@ + -g -O2 -Wall -target bpf -c $< -o $@ && $(LLVM_STRIP) -g $@ $(OUTPUT)%.skel.h: $(OUTPUT)%.bpf.o $(BPFTOOL_BOOTSTRAP) $(QUIET_GEN)$(BPFTOOL_BOOTSTRAP) gen skeleton $< > $@
Signature · 1 line
2.30.0.284.gd98b1dd5eaa7-goog
Re: [PATCH 2/2] tools/bpftool: Add -Wall when building BPF programs
Quoted 4 lines · Ian Rogers
No additional warnings are generated by enabling this, but having it enabled will help avoid regressions.
Signed-off-by Ian Rogers <[email protected]>
This series was applied to bpf/bpf-next.git (refs/heads/master):
Hello:
This series was applied to bpf/bpf-next.git (refs/heads/master):
Quoted 8 lines · On Wed, 13 Jan 2021 14:36:08 -0800 you wrote:
Add inline to
__always_inlinemaking it match thelinux/compiler.h. Adding this avoids an unused function warning onbpf_tail_call_staticwhen compining with -Wall.Signed-off-by Ian Rogers <[email protected]>--- tools/lib/bpf/bpf_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static
https://git.kernel.org/bpf/bpf-next/c/ce5a518e9de5 - [2/2] tools/bpftool: Add -Wall when building BPF programs https://git.kernel.org/bpf/bpf-next/c/bade5c554f1a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html