From: Antoine Tenart <atenart@kernel.org>
To: Hangbin Liu <hangbin.liu@linux.dev>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Shuah Khan <shuah@kernel.org>,
Willem de Bruijn <willemb@google.com>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Hangbin Liu <liuhangbin@kylinos.cn>
Subject: Re: [PATCH net] selftests: gro: remove unused variable total_data
Date: Thu, 22 Oct 2026 09:52:18 +0200 [thread overview]
Message-ID: <atnAmOuzTuL-0f4u@kwain> (raw)
In-Reply-To: <20261022-self_unused_var-v1-1-8ab10a6b7f44@kylinos.cn>
On Thu, Oct 22, 2026 at 11:09:35AM +0800, Hangbin Liu wrote:
> From: Hangbin Liu <liuhangbin@kylinos.cn>
>
> I hit a build warning when building the net selftests.
>
> gro.c: In function 'check_capacity_pkts': gro.c:1249:13: warning: variable 'total_data' set but not used [-Wunused-but-set-variable=]
> 1249 | int total_data = 0;
> | ^~~~~~~~~~
>
> Remove the total_data variable, as it is no longer used.
>
> Fixes: d97348474708 ("selftests: drv-net: gro: always wait for FIN in the capacity test")
> Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
Reviewed-by: Antoine Tenart <atenart@kernel.org>
> ---
> tools/testing/selftests/net/lib/gro.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/tools/testing/selftests/net/lib/gro.c b/tools/testing/selftests/net/lib/gro.c
> index 7a333155de1a..1bc92e7a625f 100644
> --- a/tools/testing/selftests/net/lib/gro.c
> +++ b/tools/testing/selftests/net/lib/gro.c
> @@ -1246,7 +1246,6 @@ static void check_capacity_pkts(int fd)
> int coalesced[num_flows];
> struct tcphdr *tcph;
> int ip_ext_len = 0;
> - int total_data = 0;
> int pkt_size = -1;
> int data_len = 0;
> int flow_id;
> @@ -1309,7 +1308,6 @@ static void check_capacity_pkts(int fd)
> }
>
> num_pkt++;
> - total_data += data_len;
> }
>
> /* Check flow ordering. We expect to see all non-coalesced first segs
>
> ---
> base-commit: e0a958ddfc89f2e1c43448cdaeb5b30e54e19448
> change-id: 20261022-self_unused_var-d54af8d61a56
>
> Best regards,
> --
> Hangbin Liu <liuhangbin@kylinos.cn>
>
next prev parent reply other threads:[~2026-10-22 7:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 3:09 Hangbin Liu
2026-10-22 7:52 ` Antoine Tenart [this message]
2026-10-22 15:23 ` Willem de Bruijn
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=atnAmOuzTuL-0f4u@kwain \
--to=atenart@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hangbin.liu@linux.dev \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@kylinos.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=willemb@google.com \
/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
all inboxes | Powered by JetHome®