* [PATCH] leds: lp55xx: remove variable j
@ 2022-10-20 21:07 Colin Ian King
2022-10-21 13:12 ` Pavel Machek
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-10-20 21:07 UTC (permalink / raw)
To: Pavel Machek, linux-leds; +Cc: kernel-janitors, linux-kernel
The variable j being incremented but it is never referenced,
it is redundant and can be removed.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/leds/leds-lp55xx-common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c
index 9fdfc1b9a1a0..ca2e28fb843f 100644
--- a/drivers/leds/leds-lp55xx-common.c
+++ b/drivers/leds/leds-lp55xx-common.c
@@ -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;
--
2.37.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] leds: lp55xx: remove variable j
2022-10-20 21:07 [PATCH] leds: lp55xx: remove variable j Colin Ian King
@ 2022-10-21 13:12 ` Pavel Machek
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2022-10-21 13:12 UTC (permalink / raw)
To: Colin Ian King; +Cc: linux-leds, kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
Hi!
> The variable j being incremented but it is never referenced,
> it is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Thank you, applied.
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-21 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 21:07 [PATCH] leds: lp55xx: remove variable j Colin Ian King
2022-10-21 13:12 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®