public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Gyumin Hwang <hkm73560@gmail.com>
To: Joe Perches <joe@perches.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Antoine Tenart <atenart@kernel.org>,
	netdev@vger.kernel.org, Gyumin Hwang <hkm73560@gmail.com>
Subject: [PATCH v2] net:dev: Change napi_gro_complete return type to void
Date: Sat,  2 Oct 2021 08:11:36 +0000	[thread overview]
Message-ID: <20211002081136.3754-1-hkm73560@gmail.com> (raw)
In-Reply-To: <8d21e758966ca5581edd4babe0773a28e9938a78.camel@perches.com>

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


  reply	other threads:[~2021-10-02  8:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Gyumin Hwang [this message]
2021-10-02 13:10     ` [PATCH v2] " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211002081136.3754-1-hkm73560@gmail.com \
    --to=hkm73560@gmail.com \
    --cc=atenart@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=joe@perches.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox