* [PATCH -next] ALSA: usb-audio: Remove set but not used variable 'first_ch_bits'
@ 2019-01-09 2:20 YueHaibing
2019-01-09 9:32 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-01-09 2:20 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Jorge Sanjuan, Ruslan Bilovol,
Andrew Chant
Cc: YueHaibing, alsa-devel, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
sound/usb/mixer.c: In function 'parse_audio_feature_unit':
sound/usb/mixer.c:1838:28: warning:
variable 'first_ch_bits' set but not used [-Wunused-but-set-variable]
It never used since 2.6
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
sound/usb/mixer.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index e7d441d..8ad1a24 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1835,7 +1835,7 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid,
{
int channels, i, j;
struct usb_audio_term iterm;
- unsigned int master_bits, first_ch_bits;
+ unsigned int master_bits;
int err, csize;
struct uac_feature_unit_descriptor *hdr = _ftr;
__u8 *bmaControls;
@@ -1926,10 +1926,6 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid,
break;
}
- if (channels > 0)
- first_ch_bits = snd_usb_combine_bytes(bmaControls + csize, csize);
- else
- first_ch_bits = 0;
if (state->mixer->protocol == UAC_VERSION_1) {
/* check all control types */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ALSA: usb-audio: Remove set but not used variable 'first_ch_bits'
2019-01-09 2:20 [PATCH -next] ALSA: usb-audio: Remove set but not used variable 'first_ch_bits' YueHaibing
@ 2019-01-09 9:32 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-01-09 9:32 UTC (permalink / raw)
To: YueHaibing
Cc: JorgeSanjuan, Ruslan Bilovol, Andrew Chant, Jaroslav Kysela,
alsa-devel, kernel-janitors, linux-kernel
On Wed, 09 Jan 2019 03:20:16 +0100,
YueHaibing wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> sound/usb/mixer.c: In function 'parse_audio_feature_unit':
> sound/usb/mixer.c:1838:28: warning:
> variable 'first_ch_bits' set but not used [-Wunused-but-set-variable]
>
> It never used since 2.6
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Thanks, applied now.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-09 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09 2:20 [PATCH -next] ALSA: usb-audio: Remove set but not used variable 'first_ch_bits' YueHaibing
2019-01-09 9:32 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).