netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static
@ 2021-01-13 22:36 Ian Rogers
  2021-01-13 22:36 ` [PATCH 2/2] tools/bpftool: Add -Wall when building BPF programs Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ian Rogers @ 2021-01-13 22:36 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, Andrii Nakryiko, John Fastabend, KP Singh,
	Quentin Monnet, Jean-Philippe Brucker, Tobias Klauser,
	Ilya Leoshkevich, netdev, bpf, linux-kernel
  Cc: Ian Rogers

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.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/lib/bpf/bpf_helpers.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
index 72b251110c4d..ae6c975e0b87 100644
--- a/tools/lib/bpf/bpf_helpers.h
+++ b/tools/lib/bpf/bpf_helpers.h
@@ -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))
-- 
2.30.0.284.gd98b1dd5eaa7-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] tools/bpftool: Add -Wall when building BPF programs
  2021-01-13 22:36 [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static Ian Rogers
@ 2021-01-13 22:36 ` Ian Rogers
  2021-01-14  0:49   ` Yonghong Song
  2021-01-14  0:49 ` [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static Yonghong Song
  2021-01-14  3:20 ` patchwork-bot+netdevbpf
  2 siblings, 1 reply; 5+ messages in thread
From: Ian Rogers @ 2021-01-13 22:36 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, Andrii Nakryiko, John Fastabend, KP Singh,
	Quentin Monnet, Jean-Philippe Brucker, Tobias Klauser,
	Ilya Leoshkevich, netdev, bpf, linux-kernel
  Cc: Ian Rogers

No additional warnings are generated by enabling this, but having it
enabled will help avoid regressions.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/bpf/bpftool/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index f897cb5fb12d..45ac2f9e0aa9 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -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 $< > $@
-- 
2.30.0.284.gd98b1dd5eaa7-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static
  2021-01-13 22:36 [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static Ian Rogers
  2021-01-13 22:36 ` [PATCH 2/2] tools/bpftool: Add -Wall when building BPF programs Ian Rogers
@ 2021-01-14  0:49 ` Yonghong Song
  2021-01-14  3:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Yonghong Song @ 2021-01-14  0:49 UTC (permalink / raw)
  To: Ian Rogers, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Andrii Nakryiko, John Fastabend,
	KP Singh, Quentin Monnet, Jean-Philippe Brucker, Tobias Klauser,
	Ilya Leoshkevich, netdev, bpf, linux-kernel



On 1/13/21 2:36 PM, Ian Rogers wrote:
> 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.
> 
> Signed-off-by: Ian Rogers <irogers@google.com>

Acked-by: Yonghong Song <yhs@fb.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] tools/bpftool: Add -Wall when building BPF programs
  2021-01-13 22:36 ` [PATCH 2/2] tools/bpftool: Add -Wall when building BPF programs Ian Rogers
@ 2021-01-14  0:49   ` Yonghong Song
  0 siblings, 0 replies; 5+ messages in thread
From: Yonghong Song @ 2021-01-14  0:49 UTC (permalink / raw)
  To: Ian Rogers, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Andrii Nakryiko, John Fastabend,
	KP Singh, Quentin Monnet, Jean-Philippe Brucker, Tobias Klauser,
	Ilya Leoshkevich, netdev, bpf, linux-kernel



On 1/13/21 2:36 PM, Ian Rogers wrote:
> No additional warnings are generated by enabling this, but having it
> enabled will help avoid regressions.
> 
> Signed-off-by: Ian Rogers <irogers@google.com>

Acked-by: Yonghong Song <yhs@fb.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static
  2021-01-13 22:36 [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static Ian Rogers
  2021-01-13 22:36 ` [PATCH 2/2] tools/bpftool: Add -Wall when building BPF programs Ian Rogers
  2021-01-14  0:49 ` [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static Yonghong Song
@ 2021-01-14  3:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-14  3:20 UTC (permalink / raw)
  To: Ian Rogers
  Cc: ast, daniel, kafai, songliubraving, yhs, andriin, john.fastabend,
	kpsingh, quentin, jean-philippe, tklauser, iii, netdev, bpf,
	linux-kernel

Hello:

This series was applied to bpf/bpf-next.git (refs/heads/master):

On Wed, 13 Jan 2021 14:36:08 -0800 you wrote:
> 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.
> 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-14  3:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 22:36 [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static Ian Rogers
2021-01-13 22:36 ` [PATCH 2/2] tools/bpftool: Add -Wall when building BPF programs Ian Rogers
2021-01-14  0:49   ` Yonghong Song
2021-01-14  0:49 ` [PATCH 1/2] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static Yonghong Song
2021-01-14  3:20 ` 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).