Article View: linux.kernel.netdev
Article #6276[PATCH net] selftests: gro: remove unused variable total_data
From: Hangbin Liu
Date: Thu, 22 Oct 2026 03:09
Date: Thu, 22 Oct 2026 03:09
45 lines
9913 bytes
9913 bytes
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>
---
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>
Technical Details
Message-ID:
<20261022-self_unused_var-v1-1-8ab10a6b7f44@kylinos.cn>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350356-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350356-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: [PATCH net] selftests: gro: remove unused variable total_data Date: Thu, 22 Oct 2026 11:09:35 +0800 Organization: Usenet Network Message-ID: <20261022-self_unused_var-v1-1-8ab10a6b7f44@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="117355"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:6dllkKDX0KPaPfCXo5IqK2i65xY= sha256:yMX4C3MAruuTzAY+qSd1I4PxspbUvCUkl7baGfb4hA8= sha1:91Uzj9dwZk1rdgsbC44eGMu0r6Y= sha256:r8hsunJun8RgYstOYhJ6Wd9kvwMpr+qlujd40uvNoz8= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id E88DE111169; Thu, 22 Oct 2026 06:10:40 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.049 X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ckYA_fLW3dqL; Thu, 22 Oct 2026 06:10:38 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-350356-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id D75F110E488; Thu, 22 Oct 2026 06:10:28 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 41CF335049; Thu, 22 Oct 2026 03:09:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792638591; b=XEuBEZV54W36zwZ4IApVfc5TEvw661oC7EmfqcwR4Ixi+8lD/vIZKsVHjL5NSp84Nelm 6o1A8FmVKJ5mpaOXD54c8cXtfPh+ZNDaygbhDw0YS3vAWm3M4fRzzGfK8ZP3Y6N78WBMX 2k9CxKOVDtb0dQso1FYbWJMpcwDpSpDzjxPS+QVVjGyQLW0gwVSO4cP7MR1t5Fx3alIxO BJ46pEZzaydwNq3UJdZy5tGvLGSgMfsAryAnYdM6x3D1Iu5qFTWaIFKL6Us9Pxze++cIm bOlSrBy9QY1rcVJcmDtuV0d/BJ+U73RUPsMR4emn1pm7i/qqlmtLcmRecKkI+5gTOHA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792638591; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:X-B4-Tracking:X-Change-ID:To:Cc: X-Mailer; bh=MUJZAYrAzAHox5NbWunOTBXkvjjHAyJ/e+1fwM5DNtI=; b=kXhdmnyBXgtReia+REYx2BVZzt1MHVmRS2R603pzX4jWalG2INiQwpf/zw53iQNWXjvt E9D7F3TL8GPfttUyZGVRb74HOOWCdRaGR39GTo9ewpjg2hED1L5PlLWTSFEs0dYY9+pYg CUXrftDIACSIadMVoueXUjpvDBRirdokwi84wzmD1BgUudx1HGkvc0zdzgHz5I1JHNfAq aODk/fSWQNukprCvLfz0x7IEPpzt+oeGMQaeMeKsuynx33j1t5KiaBSN9nw4io9ndUO9U aIDETs8ovpkhYTOEIv59HzWMyJTeyNgRMxSz8TbFWitz9T1FUxQyMyCykZhf7Lkbfgg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DGmL0Cvv; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 19A75606A31F; Thu, 22 Oct 2026 03:09:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DGmL0Cvv X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.197 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792638585; b=lyFCW6j5IuF4E+qs7NjHpppzXMcniVBLO3fzWZAVjV7I0LfcE0gLqOeS9VVa/oFLqsBQ KWJhYclGabvO6OvvE0iVvpVOkQBIek/0kK68KE7YkRg4cHN5Fp179PXfY5JfGckVEkLKa jrWIJRrB6O2gxkTFsFUuHqNqxjKBV3I2UJEp/7wN14O2567XrhM51O9hGIomikZEv6dEi alnvgTWiE6gEsyicPVmgUYCsDMyCqb6CY1wImGHuebqNSR61I+TM7t2JcWGQ4PGsspuR4 SxSqEAhhxbOa3D/JqYPz5VDZOPT9OpIeJnRI14WAsYUO0qF2tUXOUoTWD9CO95HY7bg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792638585; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer; bh=MUJZAYrAzAHox5NbWunOTBXkvjjHAyJ/e+1fwM5DNtI=; b=DTAG6RXlfrteCiXr2R2aD5eIBEGmDUbjuAZZmk7jUVNuchmIpcPvWqy7auaXXhq5O1+q 5TnnmPsPyIFj32yN1IG3IU3CjwLr9d6IicCNeAdHn+cIsbZFdhkikFdi8+a48IWL3F8th te8taIx2HO7NzPLCNO4ZeKD/exQ92Ve0lVeo9maISrAILFM3JyYkarPdwKIbwOQt49bEa qoZp3O6BpskaqBWRVOW4XgXDG1rMN6FSwGldeWGPwOX2BuRJrKWfLmVIk1aFDw9Uuh1wO iz9xuyC76gh2gVzntc5ADGKLW9DTe56UItSr1iiaT7sm7eit+ofmhEmT3hVcbdhdlHg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DGmL0Cvv; arc=none smtp.remote-ip=95.215.58.197 X-Received: from mta1.migadu.com (out-197.mta1.migadu.com [95.215.58.197]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6471606A31A for <netdev@vger.kernel.org>; Thu, 22 Oct 2026 03:09:43 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D6471606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=Ix6esvmcmYVkZDYk3pa2wudzAplpDNzwTlH4FWpONAw=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1792638582; v=1; x=1793243382; b=DGmL0CvvS3Xj+xHTQWrWmACkPQ01Fv5o7HfwuLmikomZpUKML0eV8gFjUCeu3JUNTNvI6UM6 IuNRSHnoSRAas812/CyOU4G82RyfEtJqKNnRRe7qAYhH+GNbBXk11k52qx9Jzns+Qv8eDTWrEZp BtYlyxbE/gH1n3MzBwll/zH0= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta11.migadu.com with ESMTPS id 8ac16d0dcb93197d; Thu, 22 Oct 2026 03:09:41 +0000 X-Mizu-Trace-ID: 8ac16d0dcb93197d X-Migadu-Flow: FLOW_OUT X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-B4-Tracking: v=1; b=H4sIAAAAAAAC/yWMQQrCMBQFr1Le2kATbBCvIlJi86JfJEp+U4TSu xt1OQMzK5RFqDh2KwoXUXnmBnbXYbqFfKWR2Biud972zhnlI401V2Ucl1BMHPYhHaK3YfBo1as wyft3PCFzxvkvtV7unObvC9v2AVngXid4AAAA X-Change-ID: 20261022-self_unused_var-d54af8d61a56 X-Cc: Hangbin Liu <hangbin.liu@linux.dev>, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Hangbin Liu <liuhangbin@kylinos.cn> X-Mailer: b4 0.16.0