diff options
author | Jiri Olsa <jolsa@kernel.org> | 2024-06-26 15:47:19 +0200 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-06-26 17:08:43 -0700 |
commit | a12978712d9001b060bcc10eaae42ad5102abe2b (patch) | |
tree | f7cf650d7a7f376dbe77e64b7074670296a95006 /tools/testing/selftests/bpf/progs/kprobe_multi_session.c | |
parent | 0f31c2c61f6923747628c65a0fe36b2d4d7e21b0 (diff) | |
download | linux-a12978712d9001b060bcc10eaae42ad5102abe2b.tar.gz linux-a12978712d9001b060bcc10eaae42ad5102abe2b.tar.bz2 linux-a12978712d9001b060bcc10eaae42ad5102abe2b.zip |
selftests/bpf: Move ARRAY_SIZE to bpf_misc.h
ARRAY_SIZE is used on multiple places, move its definition in
bpf_misc.h header.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20240626134719.3893748-1-jolsa@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/progs/kprobe_multi_session.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/kprobe_multi_session.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/progs/kprobe_multi_session.c b/tools/testing/selftests/bpf/progs/kprobe_multi_session.c index bbba9eb46551..bd8b7fb7061e 100644 --- a/tools/testing/selftests/bpf/progs/kprobe_multi_session.c +++ b/tools/testing/selftests/bpf/progs/kprobe_multi_session.c @@ -4,8 +4,7 @@ #include <bpf/bpf_tracing.h> #include <stdbool.h> #include "bpf_kfuncs.h" - -#define ARRAY_SIZE(x) (int)(sizeof(x) / sizeof((x)[0])) +#include "bpf_misc.h" char _license[] SEC("license") = "GPL"; |