linux-sg2042/sound/usb
Eldad Zack 889d66848b ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_*
The usb_control_msg() function expects __u16 types and performs
the endianness conversions by itself.
However, in three places, a conversion is performed before it is
handed over to usb_control_msg(), which leads to a double conversion
(= no conversion):
* snd_usb_nativeinstruments_boot_quirk()
* snd_nativeinstruments_control_get()
* snd_nativeinstruments_control_put()

Caught by sparse:

sound/usb/mixer_quirks.c:512:38: warning: incorrect type in argument 6 (different base types)
sound/usb/mixer_quirks.c:512:38:    expected unsigned short [unsigned] [usertype] index
sound/usb/mixer_quirks.c:512:38:    got restricted __le16 [usertype] <noident>
sound/usb/mixer_quirks.c:543:35: warning: incorrect type in argument 5 (different base types)
sound/usb/mixer_quirks.c:543:35:    expected unsigned short [unsigned] [usertype] value
sound/usb/mixer_quirks.c:543:35:    got restricted __le16 [usertype] <noident>
sound/usb/mixer_quirks.c:543:56: warning: incorrect type in argument 6 (different base types)
sound/usb/mixer_quirks.c:543:56:    expected unsigned short [unsigned] [usertype] index
sound/usb/mixer_quirks.c:543:56:    got restricted __le16 [usertype] <noident>
sound/usb/quirks.c:502:35: warning: incorrect type in argument 5 (different base types)
sound/usb/quirks.c:502:35:    expected unsigned short [unsigned] [usertype] value
sound/usb/quirks.c:502:35:    got restricted __le16 [usertype] <noident>

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-07 09:44:08 +02:00
..
6fire ALSA: usb6fire: prevent driver panic state when stopping 2012-12-07 15:03:34 +01:00
caiaq ALSA: caiaq: fix use of MODULE_SUPPORTED_DEVICES() 2013-01-29 15:10:57 +01:00
misc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound 2012-01-12 08:00:30 -08:00
usx2y mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
Kconfig ALSA: sound/usb: remove CONFIG_EXPERIMENTAL 2012-10-25 00:17:47 +02:00
Makefile ALSA: snd-usb: move code from urb.c to endpoint.c 2011-09-14 17:07:03 +02:00
card.c ALSA: usb-audio: add a workaround for the NuForce UDH-100 2013-03-12 08:35:30 +01:00
card.h ALSA: usb-audio: add channel map support 2012-11-26 16:24:02 +01:00
clock.c ALSA: usb: Work around CM6631 sample rate change bug 2013-04-03 17:05:44 +02:00
clock.h ALSA: usb-audio: simplify control interface access 2010-06-23 16:10:23 +02:00
debug.h ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set 2011-05-18 11:44:35 +02:00
endpoint.c ALSA: usb-audio: use sender stride for implicit feedback 2012-11-29 08:42:54 +01:00
endpoint.h ALSA: usb-audio: stop both data and sync endpoints asynchronously 2012-11-21 11:43:56 +01:00
format.c ALSA: usb-audio: Return meaningful error codes instead of -1 in format.c 2012-11-21 11:31:52 +01:00
format.h ALSA: usb-audio: parse more format descriptors with structs 2010-05-27 09:48:31 +02:00
helper.c ALSA: snd-usb: Add quirks for Playback Designs devices 2012-09-04 11:31:14 +02:00
helper.h ALSA: usb-audio: increase control transfer timeout 2011-09-27 09:21:48 +02:00
midi.c ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirk 2013-01-04 09:53:17 +01:00
midi.h ALSA: usb-audio: add support for Akai MPD16 2010-05-21 17:12:30 +02:00
mixer.c ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls() 2013-03-20 08:43:00 +01:00
mixer.h ALSA: usb-audio: add control index offset 2012-11-29 08:43:12 +01:00
mixer_maps.c ALSA: usb-audio: add support for M-Audio FT C600 2013-02-11 14:02:27 +01:00
mixer_quirks.c ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_* 2013-04-07 09:44:08 +02:00
mixer_quirks.h ALSA: usb-mixer: factor out quirks 2010-03-12 12:20:26 +01:00
pcm.c ALSA: usb-audio: add support for M-Audio FT C600 2013-02-11 14:02:27 +01:00
pcm.h ALSA: usb: refine delay information with USB frame counter 2011-09-12 10:30:20 +02:00
power.h ALSA: usbaudio: implement USB autosuspend 2011-03-11 14:59:29 +01:00
proc.c ALSA: usb-audio: Fix races at disconnection 2012-10-30 11:06:54 +01:00
proc.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
quirks-table.h ALSA: usb-audio: add support for M-Audio FT C600 2013-02-11 14:02:27 +01:00
quirks.c ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_* 2013-04-07 09:44:08 +02:00
quirks.h ALSA: snd-usb: Add quirks for Playback Designs devices 2012-09-04 11:31:14 +02:00
stream.c ALSA: usb-audio: add channel map support 2012-11-26 16:24:02 +01:00
stream.h ALSA: snd-usb: re-order code 2011-09-14 17:07:02 +02:00
usbaudio.h ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirk 2013-01-04 09:53:17 +01:00