03e546cb5f51c20e908bb61fb77115ffaf92bd18
[openwrt/staging/neocturne.git] /
1 From 62a3106697f3c6f9af64a2cd0f9ff58552010dc8 Mon Sep 17 00:00:00 2001
2 From: Colin Ian King <colin.i.king@gmail.com>
3 Date: Wed, 22 Dec 2021 00:39:37 +0000
4 Subject: [PATCH] net: broadcom: bcm4908enet: remove redundant variable bytes
5
6 The variable bytes is being used to summate slot lengths,
7 however the value is never used afterwards. The summation
8 is redundant so remove variable bytes.
9
10 Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
11 Link: https://lore.kernel.org/r/20211222003937.727325-1-colin.i.king@gmail.com
12 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 ---
14 drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 --
15 1 file changed, 2 deletions(-)
16
17 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
18 +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
19 @@ -634,7 +634,6 @@ static int bcm4908_enet_poll_tx(struct n
20 struct bcm4908_enet_dma_ring_bd *buf_desc;
21 struct bcm4908_enet_dma_ring_slot *slot;
22 struct device *dev = enet->dev;
23 - unsigned int bytes = 0;
24 int handled = 0;
25
26 while (handled < weight && tx_ring->read_idx != tx_ring->write_idx) {
27 @@ -645,7 +644,6 @@ static int bcm4908_enet_poll_tx(struct n
28
29 dma_unmap_single(dev, slot->dma_addr, slot->len, DMA_TO_DEVICE);
30 dev_kfree_skb(slot->skb);
31 - bytes += slot->len;
32 if (++tx_ring->read_idx == tx_ring->length)
33 tx_ring->read_idx = 0;
34