Skip to contentSkip to conversation

leds: lp55xx: remove variable j

PATCH Applied Colin Ian King 2 participants 2 messages Oct 20, 2022 – Oct 21, 2022

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

PATCH 1/1 leds: lp55xx: remove variable j

The variable j being incremented but it is never referenced, it is redundant and can be removed.

---
 drivers/leds/leds-lp55xx-common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/leds/leds-lp55xx-common.c +1 -2
index 9fdfc1b9a1a0..ca2e28fb843f 100644
@@ -166,7 +166,7 @@ static int lp55xx_init_led(struct lp55xx_led *led,
 	struct mc_subled *mc_led_info;
 	struct led_classdev *led_cdev;
 	char name[32];
-	int i, j = 0;
+	int i;
 	int ret;
 
 	if (chan >= max_channel) {
@@ -201,7 +201,6 @@ static int lp55xx_init_led(struct lp55xx_led *led,
 				pdata->led_config[chan].color_id[i];
 			mc_led_info[i].channel =
 					pdata->led_config[chan].output_num[i];
-			j++;
 		}
 
 		led->mc_cdev.subled_info = mc_led_info;
Signature · 1 line
2.37.3
Applied
#1 lore raw

Hi!

Quoted 4 lines

The variable j being incremented but it is never referenced, it is redundant and can be removed.

Thank you, applied.
Pavel

Signature · 1 line
People of Russia, stop Putin before his war on Ukraine escalates.