Skip to content

Commit

Permalink
bpf, libbpf: Avoid unused function warning on bpf_tail_call_static
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210113223609.3358812-1-irogers@google.com
  • Loading branch information
Ian Rogers authored and Andrii Nakryiko committed Jan 14, 2021
1 parent fbeed93 commit ce5a518
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/lib/bpf/bpf_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ce5a518

Please sign in to comment.