Skip to content

Commit

Permalink
net: filter: move forward declarations to avoid compile warnings
Browse files Browse the repository at this point in the history
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 <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiko Carstens authored and David S. Miller committed May 23, 2011
1 parent ce14f89 commit 792d4b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/linux/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 792d4b5

Please sign in to comment.