Skip to contentSkip to conversation

net:dev: Change napi_gro_complete return type to void

PATCH Superseded Gyumin Hwang 3 participants 4 messages Oct 2, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net:dev: Change napi_gro_complete return type to void

napi_gro_complete always returned the same value, NET_RX_SUCCESS And the value was not used anywhere

---
 net/core/dev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
net/core/dev.c +3 -3
index f930329f0dc2..b181cd49167a 100644
@@ -5839,7 +5839,7 @@ static void gro_normal_one(struct napi_struct *napi, struct sk_buff *skb, int se
 		gro_normal_list(napi);
 }
 
-static int napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
+static void napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
 {
 	struct packet_offload *ptype;
 	__be16 type = skb->protocol;
@@ -5868,12 +5868,12 @@ static int napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
 	if (err) {
 		WARN_ON(&ptype->list == head);
 		kfree_skb(skb);
-		return NET_RX_SUCCESS;
+		return;
 	}
 
 out:
 	gro_normal_one(napi, skb, NAPI_GRO_CB(skb)->count);
-	return NET_RX_SUCCESS;
+	return;
 }
 
 static void __napi_gro_flush_chain(struct napi_struct *napi, u32 index,
Signature · 1 line
2.25.1
#1 lore raw
Quoted 2 lines · Gyumin Hwang

napi_gro_complete always returned the same value, NET_RX_SUCCESS And the value was not used anywhere

[]

net/core/dev.c

Quoted 1 line
net/core/dev.c +0 -0

[]

net/core/dev.c

Quoted 13 lines
net/core/dev.c +1 -1
@@ -5868,12 +5868,12 @@ static int napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
  	if (err) {
  		WARN_ON(&ptype->list == head);
  		kfree_skb(skb);
-		return NET_RX_SUCCESS;
+		return;
  	}

 out:
  gro_normal_one(napi, skb, NAPI_GRO_CB(skb)->count);

net/core/dev.c +1 -1
-	return NET_RX_SUCCESS;
+	return;

unnecessary return at function end

Quoted 1 line

 }

#2 lore raw

PATCH v2 1/1 net:dev: Change napi_gro_complete return type to void

napi_gro_complete always returned the same value, NET_RX_SUCCESS And the value was not used anywhere

---
Changes in v2:
- Remove unnecessary return at function end

 net/core/dev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
net/core/dev.c +2 -3
index f930329f0dc2..96fd8f77ab6a 100644
@@ -5839,7 +5839,7 @@ static void gro_normal_one(struct napi_struct *napi, struct sk_buff *skb, int se
 		gro_normal_list(napi);
 }
 
-static int napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
+static void napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
 {
 	struct packet_offload *ptype;
 	__be16 type = skb->protocol;
@@ -5868,12 +5868,11 @@ static int napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
 	if (err) {
 		WARN_ON(&ptype->list == head);
 		kfree_skb(skb);
-		return NET_RX_SUCCESS;
+		return;
 	}
 
 out:
 	gro_normal_one(napi, skb, NAPI_GRO_CB(skb)->count);
-	return NET_RX_SUCCESS;
 }
 
 static void __napi_gro_flush_chain(struct napi_struct *napi, u32 index,
Signature · 1 line
2.25.1
#3 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 9 lines · On Sat, 2 Oct 2021 08:11:36 +0000 you wrote:

napi_gro_complete always returned the same value, NET_RX_SUCCESS And the value was not used anywhere

---
Changes in v2:
- Remove unnecessary return at function end

[...]

Here is the summary with links:
- [v2] net:dev: Change napi_gro_complete return type to void

    https://git.kernel.org/netdev/net-next/c/1643771eeb2d

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html