Skip to content

Commit

Permalink
ALSA: usb-line6: use the same declaration as definition in header for…
Browse files Browse the repository at this point in the history
… MIDI manufacturer ID

Currently, usb-line6 module exports an array of MIDI manufacturer ID and
usb-pod module uses it. However, the declaration is not the definition in
common header. The difference is explicit length of array. Although
compiler calculates it and everything goes well, it's better to use the
same representation between definition and declaration.

This commit fills the length of array for usb-line6 module. As a small
good sub-effect, this commit suppress below warnings from static analysis
by sparse v0.5.0.

sound/usb/line6/driver.c:274:43: error: cannot size expression
sound/usb/line6/driver.c:275:16: error: cannot size expression
sound/usb/line6/driver.c:276:16: error: cannot size expression
sound/usb/line6/driver.c:277:16: error: cannot size expression

Fixes: 705ecec ("Staging: add line6 usb driver")
Signed-off-by: Takashi Sakamoto <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
takaswie authored and tiwai committed Sep 25, 2016
1 parent 318824d commit 8da08ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/line6/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/*
This is Line 6's MIDI manufacturer ID.
*/
const unsigned char line6_midi_id[] = {
const unsigned char line6_midi_id[3] = {
0x00, 0x01, 0x0c
};
EXPORT_SYMBOL_GPL(line6_midi_id);
Expand Down

0 comments on commit 8da08ca

Please sign in to comment.