diff mbox series

[net-next,V2] : sundance: remove unused variable cnt

Message ID 20221115093137.144002-1-colin.i.king@gmail.com (mailing list archive)
State Accepted
Commit 710cfc6ab4b85ac5388828b4be63a5f20c8a9dd9
Delegated to: Netdev Maintainers
Headers show
Series [net-next,V2] : sundance: remove unused variable cnt | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 3 this patch: 3
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 3 this patch: 3
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Colin Ian King Nov. 15, 2022, 9:31 a.m. UTC
Variable cnt is just being incremented and it's never used
anywhere else. The variable and the increment are redundant so
remove it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---

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(-)

Comments

Leon Romanovsky Nov. 16, 2022, 1:23 p.m. UTC | #1
On Tue, Nov 15, 2022 at 09:31:37AM +0000, Colin Ian King wrote:
> Variable cnt is just being incremented and it's never used
> anywhere else. The variable and the increment are redundant so
> remove it.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> 
> 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,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
patchwork-bot+netdevbpf@kernel.org Nov. 17, 2022, 12:30 p.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

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.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> 
> [...]

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!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/dlink/sundance.c b/drivers/net/ethernet/dlink/sundance.c
index 43def191f26f..aaf0eda96292 100644
--- a/drivers/net/ethernet/dlink/sundance.c
+++ b/drivers/net/ethernet/dlink/sundance.c
@@ -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)