public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: broadcom: bcm4908enet: remove redundant variable bytes
@ 2021-12-22  0:39 Colin Ian King
  2021-12-22 23:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2021-12-22  0:39 UTC (permalink / raw)
  To: Rafał Miłecki, bcm-kernel-feedback-list,
	David S . Miller, Jakub Kicinski, netdev
  Cc: kernel-janitors, linux-kernel

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 <colin.i.king@gmail.com>
---
 drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c
index b07cb9bc5f2d..4a2622b05ee1 100644
--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
@@ -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;
 
-- 
2.33.1


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

* Re: [PATCH] net: broadcom: bcm4908enet: remove redundant variable bytes
  2021-12-22  0:39 [PATCH] net: broadcom: bcm4908enet: remove redundant variable bytes Colin Ian King
@ 2021-12-22 23:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-22 23:10 UTC (permalink / raw)
  To: Colin Ian King
  Cc: rafal, bcm-kernel-feedback-list, davem, kuba, netdev,
	kernel-janitors, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

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 <colin.i.king@gmail.com>
> ---
>  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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-12-22 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-22  0:39 [PATCH] net: broadcom: bcm4908enet: remove redundant variable bytes Colin Ian King
2021-12-22 23:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox