aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2023-04-11 20:46:47 -0700
committerDaniel Borkmann <[email protected]>2023-04-13 14:54:45 +0200
commit4099be372faf7b3616634dfe6994b81b1edf1906 (patch)
tree5eb1a819017e649c8d7fe59dd55222c0aae0a774
parent0c5f48599bed55c13d6f979ea824554bdebdf2ad (diff)
selftests/bpf: Fix compiler warnings in bpf_testmod for kfuncs
Add -Wmissing-prototypes ignore in bpf_testmod.c, similarly to what we do in kernel code proper. Reported-by: kernel test robot <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Link: https://lore.kernel.org/bpf/[email protected]
-rw-r--r--tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
index c5ad39bbe9af..fe847ebfb731 100644
--- a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
+++ b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
@@ -28,6 +28,10 @@ struct bpf_testmod_struct_arg_2 {
long b;
};
+__diag_push();
+__diag_ignore_all("-Wmissing-prototypes",
+ "Global functions as their definitions will be in bpf_testmod.ko BTF");
+
noinline int
bpf_testmod_test_struct_arg_1(struct bpf_testmod_struct_arg_2 a, int b, int c) {
bpf_testmod_test_struct_arg_result = a.a + a.b + b + c;
@@ -175,6 +179,8 @@ noinline int bpf_testmod_fentry_test3(char a, int b, u64 c)
return a + b + c;
}
+__diag_pop();
+
int bpf_testmod_fentry_ok;
noinline ssize_t