lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 2 Oct 2022 09:35:38 +0300 From: Shay Agroskin <shayagr@...zon.com> To: Chen Zhongjin <chenzhongjin@...wei.com>, <netdev@...r.kernel.org> CC: <akiyano@...zon.com>, <darinzon@...zon.com>, <ndagan@...zon.com>, <saeedb@...zon.com>, <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>, <nkoler@...zon.com>, <42.hyeyoo@...il.com> Subject: Re: [PATCH -next] net: ena: Remove unused variable 'tx_bytes' Chen Zhongjin <chenzhongjin@...wei.com> writes: > CAUTION: This email originated from outside of the > organization. Do not click links or open attachments unless you > can confirm the sender and know the content is safe. > > > > 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@...wei.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; Nice catch. Thanks Acked-by: Shay Agroskin <shayagr@...zon.com>
Powered by blists - more mailing lists