Fix sparse build warning:
net/bpf/test_run.c:120:14: warning:
symbol 'bpf_fentry_test1' was not declared. Should it be static?
net/bpf/test_run.c:125:14: warning:
symbol 'bpf_fentry_test2' was not declared. Should it be static?
net/bpf/test_run.c:130:14: warning:
symbol 'bpf_fentry_test3' was not declared. Should it be static?
net/bpf/test_run.c:135:14: warning:
symbol 'bpf_fentry_test4' was not declared. Should it be static?
net/bpf/test_run.c:140:14: warning:
symbol 'bpf_fentry_test5' was not declared. Should it be static?
net/bpf/test_run.c:145:14: warning:
symbol 'bpf_fentry_test6' was not declared. Should it be static?
net/bpf/test_run.c:154:14: warning:
symbol 'bpf_fentry_test7' was not declared. Should it be static?
net/bpf/test_run.c:159:14: warning:
symbol 'bpf_fentry_test8' was not declared. Should it be static?
net/bpf/test_run.c:164:14: warning:
symbol 'bpf_modify_return_test' was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Wang Hai <wanghai38@xxxxxxxxxx>
---[...]
net/bpf/test_run.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
index b03c469cd01f..0d78bd9b6c9d 100644
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -117,32 +117,32 @@ static int bpf_test_finish(const union bpf_attr *kattr,
__diag_push();
__diag_ignore(GCC, 8, "-Wmissing-prototypes",
"Global functions as their definitions will be in vmlinux BTF");
-int noinline bpf_fentry_test1(int a)
+static noinline int bpf_fentry_test1(int a)
{
return a + 1;
}
-int noinline bpf_fentry_test2(int a, u64 b)
+static noinline int bpf_fentry_test2(int a, u64 b)
{
return a + b;
}
-int noinline bpf_fentry_test3(char a, int b, u64 c)
+static noinline int bpf_fentry_test3(char a, int b, u64 c)
{
return a + b + c;
}