diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-03-09 01:17:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-09 05:35:16 +0100 |
commit | f2459201c72e8f8553644505eed19954d4c3a023 (patch) | |
tree | adc3763012badd17d0f4d147ac64f6814e2b2546 | |
parent | staging:rtl8821ae:btcoexist: Fix non-ANSI sparse warnings (diff) | |
download | linux-f2459201c72e8f8553644505eed19954d4c3a023.tar.xz linux-f2459201c72e8f8553644505eed19954d4c3a023.zip |
staging:line6: Fix use of variable length arrays
This patch fixes the sparse warning:
drivers/staging/line6/midi.c:50:34: warning: Variable length array is used.
The size is same as the variable LINE6_FALLBACK_MAXPACKETSIZE,
so use that.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/line6/midi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c index 3f6d78c585fb..a95c85785213 100644 --- a/drivers/staging/line6/midi.c +++ b/drivers/staging/line6/midi.c @@ -47,7 +47,7 @@ static void line6_midi_transmit(struct snd_rawmidi_substream *substream) struct snd_line6_midi *line6midi = line6->line6midi; struct midi_buffer *mb = &line6midi->midibuf_out; unsigned long flags; - unsigned char chunk[line6->max_packet_size]; + unsigned char chunk[LINE6_FALLBACK_MAXPACKETSIZE]; int req, done; spin_lock_irqsave(&line6->line6midi->midi_transmit_lock, flags); @@ -64,7 +64,7 @@ static void line6_midi_transmit(struct snd_rawmidi_substream *substream) } for (;;) { - done = line6_midibuf_read(mb, chunk, line6->max_packet_size); + done = line6_midibuf_read(mb, chunk, LINE6_FALLBACK_MAXPACKETSIZE); if (done == 0) break; |