[PATCH] net: filter: move forward declarations to avoid compile warnings

Subsystems: bpf [core], bpf [general] (safe dynamic programs and tools), the rest

STALE5571d

2 messages, 2 authors, 2011-05-23 · open the first message on its own page

[PATCH] net: filter: move forward declarations to avoid compile warnings

From: Heiko Carstens <hidden>
Date: 2011-05-22 17:08:20

From: Heiko Carstens <redacted>

Get rid of this compile warning:

In file included from arch/s390/kernel/compat_linux.c:37:0:
include/linux/filter.h:139:23: warning: 'struct sk_buff' declared inside parameter list

Signed-off-by: Heiko Carstens <redacted>
---

 include/linux/filter.h |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 4609b85..9ee3f9f 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -131,6 +131,10 @@ struct sock_fprog {	/* Required for SO_ATTACH_FILTER. */
 #define SKF_LL_OFF    (-0x200000)
 
 #ifdef __KERNEL__
+
+struct sk_buff;
+struct sock;
+
 struct sk_filter
 {
 	atomic_t		refcnt;
@@ -146,9 +150,6 @@ static inline unsigned int sk_filter_len(const struct sk_filter *fp)
 	return fp->len * sizeof(struct sock_filter) + sizeof(*fp);
 }
 
-struct sk_buff;
-struct sock;
-
 extern int sk_filter(struct sock *sk, struct sk_buff *skb);
 extern unsigned int sk_run_filter(const struct sk_buff *skb,
 				  const struct sock_filter *filter);

Re: [PATCH] net: filter: move forward declarations to avoid compile warnings

From: David Miller <davem@davemloft.net>
Date: 2011-05-23 01:02:09

From: Heiko Carstens <redacted>
Date: Sun, 22 May 2011 19:08:11 +0200
From: Heiko Carstens <redacted>

Get rid of this compile warning:

In file included from arch/s390/kernel/compat_linux.c:37:0:
include/linux/filter.h:139:23: warning: 'struct sk_buff' declared inside parameter list

Signed-off-by: Heiko Carstens <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help