]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/core/filter.c
[NET]: fix up misplaced inlines.
[linux-2.6-omap-h63xx.git] / net / core / filter.c
index 6732782a5a4009f8aaf9313da097b81e746977f7..8d185a089c53cdce1dced05fe08a6cd48f4d8f9e 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <linux/module.h>
 #include <linux/types.h>
-#include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/fcntl.h>
 #include <linux/socket.h>
@@ -53,7 +52,7 @@ static void *__load_pointer(struct sk_buff *skb, int k)
 }
 
 static inline void *load_pointer(struct sk_buff *skb, int k,
-                                 unsigned int size, void *buffer)
+                                unsigned int size, void *buffer)
 {
        if (k >= 0)
                return skb_header_pointer(skb, k, size, buffer);
@@ -91,7 +90,7 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int
         */
        for (pc = 0; pc < flen; pc++) {
                fentry = &filter[pc];
-                       
+
                switch (fentry->code) {
                case BPF_ALU|BPF_ADD|BPF_X:
                        A += X;
@@ -178,7 +177,7 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int
 load_w:
                        ptr = load_pointer(skb, k, 4, &tmp);
                        if (ptr != NULL) {
-                               A = ntohl(get_unaligned((u32 *)ptr));
+                               A = ntohl(get_unaligned((__be32 *)ptr));
                                continue;
                        }
                        break;
@@ -187,7 +186,7 @@ load_w:
 load_h:
                        ptr = load_pointer(skb, k, 2, &tmp);
                        if (ptr != NULL) {
-                               A = ntohs(get_unaligned((u16 *)ptr));
+                               A = ntohs(get_unaligned((__be16 *)ptr));
                                continue;
                        }
                        break;
@@ -261,7 +260,7 @@ load_b:
                 */
                switch (k-SKF_AD_OFF) {
                case SKF_AD_PROTOCOL:
-                       A = htons(skb->protocol);
+                       A = ntohs(skb->protocol);
                        continue;
                case SKF_AD_PKTTYPE:
                        A = skb->pkt_type;
@@ -399,7 +398,7 @@ int sk_chk_filter(struct sock_filter *filter, int flen)
  */
 int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
 {
-       struct sk_filter *fp; 
+       struct sk_filter *fp;
        unsigned int fsize = sizeof(struct sock_filter) * fprog->len;
        int err;
 
@@ -411,7 +410,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
        if (!fp)
                return -ENOMEM;
        if (copy_from_user(fp->insns, fprog->filter, fsize)) {
-               sock_kfree_s(sk, fp, fsize+sizeof(*fp)); 
+               sock_kfree_s(sk, fp, fsize+sizeof(*fp));
                return -EFAULT;
        }