From: Takashi Sakamoto Date: Sun, 18 Oct 2015 13:39:52 +0000 (+0900) Subject: ALSA: bebob: use correct type for __be32 data X-Git-Tag: v3.16.35~972 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fa79e58034e31df4b7e1e84703edc88d0f15ad0;p=thirdparty%2Fkernel%2Fstable.git ALSA: bebob: use correct type for __be32 data commit fef586d58960bc867c1fa8126ee5d7364a5a89ac upstream. In former commit, metering is supported for BeBoB based models customized by M-Audio. The data in transaction is aligned to big-endianness, while in the driver code u16 typed variable is assigned to the data. This causes sparse warnings. bebob_maudio.c:651:31: warning: cast to restricted __be16 bebob_maudio.c:651:31: warning: cast to restricted __be16 bebob_maudio.c:651:31: warning: cast to restricted __be16 bebob_maudio.c:651:31: warning: cast to restricted __be16 This commit fixes this bug by using __be16 variable for the data. Fixes: 3149ac489ff8('ALSA: bebob: Add support for M-Audio special Firewire series') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai Signed-off-by: Luis Henriques --- diff --git a/sound/firewire/bebob/bebob_maudio.c b/sound/firewire/bebob/bebob_maudio.c index 0215a9194d885..96f770024c3bc 100644 --- a/sound/firewire/bebob/bebob_maudio.c +++ b/sound/firewire/bebob/bebob_maudio.c @@ -644,7 +644,7 @@ static char *const special_meter_labels[] = { static int special_meter_get(struct snd_bebob *bebob, u32 *target, unsigned int size) { - u16 *buf; + __be16 *buf; unsigned int i, c, channels; int err;