Skip to contentSkip to conversation

net: mvneta: Remove unused variable i

PATCH Applied Colin Ian King 2 participants 2 messages Oct 28, 2022 – Oct 31, 2022

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

PATCH 1/1 net: mvneta: Remove unused variable i

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

---
 drivers/net/ethernet/marvell/mvneta.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/marvell/mvneta.c +1 -3
index ff3e361e06e7..1822796f8498 100644
@@ -4266,7 +4266,7 @@ static void mvneta_mdio_remove(struct mvneta_port *pp)
  */
 static void mvneta_percpu_elect(struct mvneta_port *pp)
 {
-	int elected_cpu = 0, max_cpu, cpu, i = 0;
+	int elected_cpu = 0, max_cpu, cpu;
 
 	/* Use the cpu associated to the rxq when it is online, in all
 	 * the other cases, use the cpu 0 which can't be offline.
@@ -4306,8 +4306,6 @@ static void mvneta_percpu_elect(struct mvneta_port *pp)
 		 */
 		smp_call_function_single(cpu, mvneta_percpu_unmask_interrupt,
 					 pp, true);
-		i++;
-
 	}
 };
 
Signature · 1 line
2.37.3
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

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

Quoted 7 lines · On Fri, 28 Oct 2022 13:36:24 +0100 you wrote:

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

---
 drivers/net/ethernet/marvell/mvneta.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Here is the summary with links:
- net: mvneta: Remove unused variable i

    https://git.kernel.org/netdev/net-next/c/0cf9deb3005f

You are awesome, thank you!

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