]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/act_pedit.c
[NET] DCCP: Fix whitespace errors.
[linux-2.6-omap-h63xx.git] / net / sched / act_pedit.c
index 3d6a2fcc9ce4e46aea8796108b054eb7d6e4d070..b46fab5fb323a131946ce418b6d97c8889a941f3 100644 (file)
@@ -9,25 +9,15 @@
  * Authors:    Jamal Hadi Salim (2002-4)
  */
 
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/bitops.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/socket.h>
-#include <linux/sockios.h>
-#include <linux/in.h>
 #include <linux/errno.h>
-#include <linux/interrupt.h>
-#include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <linux/rtnetlink.h>
 #include <linux/module.h>
 #include <linux/init.h>
-#include <linux/proc_fs.h>
-#include <net/sock.h>
+#include <net/netlink.h>
 #include <net/pkt_sched.h>
 #include <linux/tc_act/tc_pedit.h>
 #include <net/tc_act/tc_pedit.h>
@@ -136,7 +126,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
                }
        }
 
-       pptr = skb->nh.raw;
+       pptr = skb_network_header(skb);
 
        spin_lock(&p->tcf_lock);
 
@@ -163,8 +153,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
                                printk("offset must be on 32 bit boundaries\n");
                                goto bad;
                        }
-                       if (skb->len < 0 ||
-                           (offset > 0 && offset > skb->len)) {
+                       if (offset > 0 && offset > skb->len) {
                                printk("offset %d cant exceed pkt length %d\n",
                                       offset, skb->len);
                                goto bad;
@@ -195,7 +184,7 @@ done:
 static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,
                          int bind, int ref)
 {
-       unsigned char *b = skb->tail;
+       unsigned char *b = skb_tail_pointer(skb);
        struct tcf_pedit *p = a->priv;
        struct tc_pedit *opt;
        struct tcf_t t;
@@ -226,7 +215,7 @@ static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,
        return skb->len;
 
 rtattr_failure:
-       skb_trim(skb, b - skb->data);
+       nlmsg_trim(skb, b);
        kfree(opt);
        return -1;
 }