Skip to contentSkip to conversation

: sundance: remove unused variable cnt

PATCH Applied Colin Ian King 3 participants 3 messages Nov 15, 2022 – Nov 17, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 : sundance: remove unused variable cnt

Variable cnt is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it.

---

V2: Use the correct net-next convention. I do hope I've got this correct,
apologies for being consistently incorrect in the past.

---
 drivers/net/ethernet/dlink/sundance.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/dlink/sundance.c +0 -2
index 43def191f26f..aaf0eda96292 100644
@@ -1414,7 +1414,6 @@ static void refill_rx (struct net_device *dev)
 {
 	struct netdev_private *np = netdev_priv(dev);
 	int entry;
-	int cnt = 0;
 
 	/* Refill the Rx ring buffers. */
 	for (;(np->cur_rx - np->dirty_rx + RX_RING_SIZE) % RX_RING_SIZE > 0;
@@ -1441,7 +1440,6 @@ static void refill_rx (struct net_device *dev)
 		np->rx_ring[entry].frag.length =
 			cpu_to_le32(np->rx_buf_sz | LastFrag);
 		np->rx_ring[entry].status = 0;
-		cnt++;
 	}
 }
 static void netdev_error(struct net_device *dev, int intr_status)
Signature · 1 line
2.38.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Colin Ian King

Variable cnt is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it.

---

V2: Use the correct net-next convention. I do hope I've got this correct,
apologies for being consistently incorrect in the past.

Almost :)
[PATCH net-next][V2] -> [PATCH net-next V2]

Thanks,

#2 lore raw
In reply to Colin Ian King
This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Tue, 15 Nov 2022 09:31:37 +0000 you wrote:

Variable cnt is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it.

---

[...]

Here is the summary with links:
- [net-next,V2] : sundance: remove unused variable cnt

    https://git.kernel.org/netdev/net-next/c/710cfc6ab4b8

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html