Skip to contentSkip to conversation

ALSA: usb-audio: remove redundant assignment to variable c

PATCH In review Colin Ian King 2 participants 2 messages Feb 7, 2022

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

PATCH 1/1 ALSA: usb-audio: remove redundant assignment to variable c

The variable c is being initialized in an outer for-loop and also re-initialized inside an inner for-loop. The first initialization is redundant and can be removed.

---
 sound/usb/mixer_s1810c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/mixer_s1810c.c +1 -1
index 0255089c9efb..fac4bbc6b275 100644
@@ -221,7 +221,7 @@ static int snd_s1810c_init_mixer_maps(struct snd_usb_audio *chip)
 	e = 0xbc;
 	for (n = 0; n < 2; n++) {
 		off = n * 18;
-		for (b = off, c = 0; b < 18 + off; b++) {
+		for (b = off; b < 18 + off; b++) {
 			/* This channel to all outputs ? */
 			for (c = 0; c <= 8; c++) {
 				snd_s1810c_send_ctl_packet(dev, a, b, c, 0, e);
Signature · 1 line
2.34.1
#1 lore raw
Quoted 6 lines · Colin Ian King

The variable c is being initialized in an outer for-loop and also re-initialized inside an inner for-loop. The first initialization is redundant and can be removed.

The code change looks OK, but when I apply your patch now, git-am converts the Author address to your new @intel.com, and this mismatches with the address in Signed-off-by. Should I keep the original gmail address, or would you fix up your Signed-off-by (and From) for avoiding those inconsistency?

thanks,

Takashi