Skip to contentSkip to conversation

ALSA: echoaudio: remove redundant assignment to variable i

PATCH Applied Colin Ian King 2 participants 2 messages Apr 5, 2022

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

PATCH 1/1 ALSA: echoaudio: remove redundant assignment to variable i

The variable i is being assigned a value that is never read, it is being re-assigned in the following for-loop. The assignment is redundant and can be removed.

---
 sound/pci/echoaudio/midi.c | 1 -
 1 file changed, 1 deletion(-)
sound/pci/echoaudio/midi.c +0 -1
index 7be5c3327b16..47b2c023ee3d 100644
@@ -124,7 +124,6 @@ static int midi_service_irq(struct echoaudio *chip)
 		return 0;
 
 	/* Get the MIDI data from the comm page */
-	i = 1;
 	received = 0;
 	for (i = 1; i <= count; i++) {
 		/* Get the MIDI byte */
Signature · 1 line
2.35.1
Applied
#1 lore raw
Quoted 6 lines · Colin Ian King

The variable i is being assigned a value that is never read, it is being re-assigned in the following for-loop. The assignment is redundant and can be removed.

Thanks, applied.

Takashi