public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net:dev: Change napi_gro_complete return type to void
@ 2021-10-02  6:11 Gyumin Hwang
  2021-10-02  7:22 ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Gyumin Hwang @ 2021-10-02  6:11 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Herbert Xu
  Cc: Daniel Borkmann, Antoine Tenart, netdev, Gyumin Hwang

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

Signed-off-by: Gyumin Hwang <hkm73560@gmail.com>
---
 net/core/dev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index f930329f0dc2..b181cd49167a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net:dev: Change napi_gro_complete return type to void
  2021-10-02  6:11 [PATCH] net:dev: Change napi_gro_complete return type to void Gyumin Hwang
@ 2021-10-02  7:22 ` Joe Perches
  2021-10-02  8:11   ` [PATCH v2] " Gyumin Hwang
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2021-10-02  7:22 UTC (permalink / raw)
  To: Gyumin Hwang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Herbert Xu
  Cc: Daniel Borkmann, Antoine Tenart, netdev

On Sat, 2021-10-02 at 06:11 +0000, Gyumin Hwang wrote:
> napi_gro_complete always returned the same value, NET_RX_SUCCESS
> And the value was not used anywhere
[]
> diff --git a/net/core/dev.c b/net/core/dev.c
[]
> @@ -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;

unnecessary return at function end

>  }




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] net:dev: Change napi_gro_complete return type to void
  2021-10-02  7:22 ` Joe Perches
@ 2021-10-02  8:11   ` Gyumin Hwang
  2021-10-02 13:10     ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 4+ messages in thread
From: Gyumin Hwang @ 2021-10-02  8:11 UTC (permalink / raw)
  To: Joe Perches, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Herbert Xu
  Cc: Daniel Borkmann, Antoine Tenart, netdev, Gyumin Hwang

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

Signed-off-by: Gyumin Hwang <hkm73560@gmail.com>
---
Changes in v2:
  - Remove unnecessary return at function end

 net/core/dev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index f930329f0dc2..96fd8f77ab6a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] net:dev: Change napi_gro_complete return type to void
  2021-10-02  8:11   ` [PATCH v2] " Gyumin Hwang
@ 2021-10-02 13:10     ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-02 13:10 UTC (permalink / raw)
  To: Gyumin Hwang; +Cc: joe, davem, edumazet, kuba, herbert, daniel, atenart, netdev

Hello:

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

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
> 
> Signed-off-by: Gyumin Hwang <hkm73560@gmail.com>
> ---
> 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-02 13:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-02  6:11 [PATCH] net:dev: Change napi_gro_complete return type to void Gyumin Hwang
2021-10-02  7:22 ` Joe Perches
2021-10-02  8:11   ` [PATCH v2] " Gyumin Hwang
2021-10-02 13:10     ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox