[PATCH] net: skbuff: Fix misleading comments for skb_put() and skb_push()

Ziran Zhang posted 1 patch 5 hours ago
net/core/skbuff.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[PATCH] net: skbuff: Fix misleading comments for skb_put() and skb_push()
Posted by Ziran Zhang 5 hours ago
Both functions only move the tail/data pointer, they do not copy data.
Update the function descriptions and @len parameter, so they can accurately
reflect the semantics.

Signed-off-by: Ziran Zhang <zhangcoder@yeah.net>
---
 net/core/skbuff.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 18dabb4e9..35ad782ad 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2614,9 +2614,9 @@ void *pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len)
 EXPORT_SYMBOL_GPL(pskb_put);
 
 /**
- *	skb_put - add data to a buffer
+ *	skb_put - extend the data area at the tail of a buffer
  *	@skb: buffer to use
- *	@len: amount of data to add
+ *	@len: number of bytes to extend
  *
  *	This function extends the used data area of the buffer. If this would
  *	exceed the total buffer size the kernel will panic. A pointer to the
@@ -2635,9 +2635,9 @@ void *skb_put(struct sk_buff *skb, unsigned int len)
 EXPORT_SYMBOL(skb_put);
 
 /**
- *	skb_push - add data to the start of a buffer
+ *	skb_push - extend the data area at the start of a buffer
  *	@skb: buffer to use
- *	@len: amount of data to add
+ *	@len: number of bytes to extend
  *
  *	This function extends the used data area of the buffer at the buffer
  *	start. If this would exceed the total buffer headroom the kernel will
-- 
2.43.0