This patch optimizes __skb_push function

Signed-off-by: Mohammad Jamal <md.jamalmohiud...@gmail.com>
---
 include/linux/skbuff.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 85ab7d7..9acffb2 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1671,9 +1671,8 @@ static inline unsigned char *__skb_put(struct sk_buff 
*skb, unsigned int len)
 unsigned char *skb_push(struct sk_buff *skb, unsigned int len);
 static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
 {
-       skb->data -= len;
        skb->len  += len;
-       return skb->data;
+       return skb->data -= len;
 }
 
 unsigned char *skb_pull(struct sk_buff *skb, unsigned int len);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to