summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_align.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2018-08-08 11:01:27 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2018-08-11 02:58:46 +0300
commitaa5f0c96cc7b96a678779055b2ff4cd9dabd8ba7 (patch)
tree3f842ab7be06a1846f5332821006bf6d892ddedf /tools/testing/selftests/bpf/test_align.c
parent8217ca653ec601246832d562207bc24bdf652d2f (diff)
downloadlinux-aa5f0c96cc7b96a678779055b2ff4cd9dabd8ba7.tar.xz
bpf: Refactor ARRAY_SIZE macro to bpf_util.h
This patch refactors the ARRAY_SIZE macro to bpf_util.h. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_align.c')
-rw-r--r--tools/testing/selftests/bpf/test_align.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/testing/selftests/bpf/test_align.c b/tools/testing/selftests/bpf/test_align.c
index 6b1b302310fe..5f377ec53f2f 100644
--- a/tools/testing/selftests/bpf/test_align.c
+++ b/tools/testing/selftests/bpf/test_align.c
@@ -18,10 +18,7 @@
#include "../../../include/linux/filter.h"
#include "bpf_rlimit.h"
-
-#ifndef ARRAY_SIZE
-# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#endif
+#include "bpf_util.h"
#define MAX_INSNS 512
#define MAX_MATCHES 16