Skip to contentSkip to conversation

ALSA: rawmidi: remove variable dest_frames

PATCH Applied Colin Ian King 2 participants 2 messages Oct 24, 2022

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

PATCH 1/1 ALSA: rawmidi: remove variable dest_frames

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

---
 sound/core/rawmidi.c | 2 --
 1 file changed, 2 deletions(-)
sound/core/rawmidi.c +0 -2
index d8edb6055072..7147fda66d93 100644
@@ -1050,7 +1050,6 @@ static int receive_with_tstamp_framing(struct snd_rawmidi_substream *substream,
 	struct snd_rawmidi_runtime *runtime = substream->runtime;
 	struct snd_rawmidi_framing_tstamp *dest_ptr;
 	struct snd_rawmidi_framing_tstamp frame = { .tv_sec = tstamp->tv_sec, .tv_nsec = tstamp->tv_nsec };
-	int dest_frames = 0;
 	int orig_count = src_count;
 	int frame_size = sizeof(struct snd_rawmidi_framing_tstamp);
 
@@ -1077,7 +1076,6 @@ static int receive_with_tstamp_framing(struct snd_rawmidi_substream *substream,
 		runtime->avail += frame_size;
 		runtime->hw_ptr += frame_size;
 		runtime->hw_ptr %= runtime->buffer_size;
-		dest_frames++;
 	}
 	return orig_count - src_count;
 }
Signature · 1 line
2.37.3
Applied
#1 lore raw
Quoted 6 lines · Colin Ian King

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

Thanks, applied.

Takashi