net: broadcom: bcm4908enet: remove redundant variable bytes
PATCH 1/1 net: broadcom: bcm4908enet: remove redundant variable bytes
The variable bytes is being used to summate slot lengths, however the value is never used afterwards. The summation is redundant so remove variable bytes.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/broadcom/bcm4908_enet.c +0 -2
@@ -635,7 +635,6 @@ static int bcm4908_enet_poll_tx(struct napi_struct *napi, int weight)struct bcm4908_enet_dma_ring_bd *buf_desc;struct bcm4908_enet_dma_ring_slot *slot;struct device *dev = enet->dev; -unsigned int bytes =0 ;int handled =0 ;while (handled < weight && tx_ring->read_idx != tx_ring->write_idx) {
@@ -646,7 +645,6 @@ static int bcm4908_enet_poll_tx(struct napi_struct *napi, int weight)dma_unmap_single (dev, slot->dma_addr, slot->len,DMA_TO_DEVICE );dev_kfree_skb (slot->skb); - bytes += slot->len;if (++tx_ring->read_idx == tx_ring->length) tx_ring->read_idx =0 ;
Signature · 1 line
2.33.1
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 22 Dec 2021 00:39:37 +0000 you wrote:
The variable bytes is being used to summate slot lengths, however the value is never used afterwards. The summation is redundant so remove variable bytes.
Signed-off-by Colin Ian King <[email protected]>--- drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 -- 1 file changed, 2 deletions(-)
Here is the summary with links:
- net: broadcom: bcm4908enet: remove redundant variable bytes
https://git.kernel.org/netdev/net-next/c/62a3106697f3
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html