bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf: fix build warning - missing prototype
@ 2020-03-22 14:08 Jean-Philippe Menil
  2020-03-23  5:32 ` Yonghong Song
  0 siblings, 1 reply; 11+ messages in thread
From: Jean-Philippe Menil @ 2020-03-22 14:08 UTC (permalink / raw)
  To: netdev
  Cc: kernel-janitors, jpmenil, David S. Miller, Jakub Kicinski,
	Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, Andrii Nakryiko, bpf, linux-kernel

Fix build warning when building net/bpf/test_run.o with W=1 due
to missing prototype for bpf_fentry_test{1..6}.

These functions are only used in test_run.c so just make them static.
Therefore inline keyword should sit between storage class and type.

Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
---
 net/bpf/test_run.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
index d555c0d8657d..c0dcd29f682c 100644
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -113,32 +113,32 @@ static int bpf_test_finish(const union bpf_attr *kattr,
  * architecture dependent calling conventions. 7+ can be supported in the
  * future.
  */
-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;
 }
 
-int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
+static noinline int bpf_fentry_test4(void *a, char b, int c, u64 d)
 {
 	return (long)a + b + c + d;
 }
 
-int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
+static noinline int bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
 {
 	return a + (long)b + c + d + e;
 }
 
-int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
+static noinline int bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
 {
 	return a + (long)b + c + d + (long)e + f;
 }
-- 
2.25.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-03-28 17:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-22 14:08 [PATCH] bpf: fix build warning - missing prototype Jean-Philippe Menil
2020-03-23  5:32 ` Yonghong Song
2020-03-23  7:42   ` Jean-Philippe Menil
2020-03-23 14:52     ` Yonghong Song
2020-03-24  7:22       ` [PATCH v2] " Jean-Philippe Menil
2020-03-24 16:19         ` Yonghong Song
2020-03-26 23:54         ` Alexei Starovoitov
2020-03-27  7:55           ` [PATCH v3] " Jean-Philippe Menil
2020-03-27 20:34             ` Daniel Borkmann
2020-03-27 20:47               ` [PATCH v4] " Jean-Philippe Menil
2020-03-28 17:15                 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).