netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] net: ena: Remove unused variable 'tx_bytes'
@ 2022-10-10  3:19 Chen Zhongjin
  2022-10-02  6:35 ` Shay Agroskin
  2022-10-03 16:42 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Chen Zhongjin @ 2022-10-10  3:19 UTC (permalink / raw)
  To: linux-kernel, netdev
  Cc: shayagr, akiyano, darinzon, ndagan, saeedb, davem, edumazet, kuba,
	pabeni, nkoler, 42.hyeyoo, chenzhongjin

Reported by Clang [-Wunused-but-set-variable]

'commit 548c4940b9f1 ("net: ena: Implement XDP_TX action")'
This commit introduced the variable 'tx_bytes'. However this variable
is never used by other code except iterates itself, so remove it.

Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
---
 drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 6a356a6cee15..c8dfb9287856 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -1876,7 +1876,6 @@ static int ena_clean_xdp_irq(struct ena_ring *xdp_ring, u32 budget)
 {
 	u32 total_done = 0;
 	u16 next_to_clean;
-	u32 tx_bytes = 0;
 	int tx_pkts = 0;
 	u16 req_id;
 	int rc;
@@ -1914,7 +1913,6 @@ static int ena_clean_xdp_irq(struct ena_ring *xdp_ring, u32 budget)
 			  "tx_poll: q %d skb %p completed\n", xdp_ring->qid,
 			  xdpf);
 
-		tx_bytes += xdpf->len;
 		tx_pkts++;
 		total_done += tx_info->tx_descs;
 
-- 
2.33.0


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

end of thread, other threads:[~2022-10-03 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-10  3:19 [PATCH -next] net: ena: Remove unused variable 'tx_bytes' Chen Zhongjin
2022-10-02  6:35 ` Shay Agroskin
2022-10-03 16:42 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).