From 527d0e40e72351b8d0c5824fc42bb4da1ecd9afb Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 24 Aug 2022 11:20:25 +0800 Subject: [PATCH] bpf, libbpf: Avoid unused function warning on bpf_tail_call_static mainline inclusion from mainline-5.12-rc1 commit ce5a518e9de53446f10d46fac98640f7ac026100 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce5a518e9de53446f10d46fac98640f7ac026100 ------------------------------------------------- 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 Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210113223609.3358812-1-irogers@google.com (cherry picked from commit ce5a518e9de53446f10d46fac98640f7ac026100) Signed-off-by: Wang Yufen --- 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)) -- GitLab