From: YueHaibing <yuehaibing@huawei.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
"Jorge Sanjuan" <jorge.sanjuan@codethink.co.uk>,
Ruslan Bilovol <ruslan.bilovol@gmail.com>,
Andrew Chant <achant@google.com>
Cc: YueHaibing <yuehaibing@huawei.com>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] ALSA: usb-audio: Remove set but not used variable 'first_ch_bits'
Date: Wed, 9 Jan 2019 02:20:16 +0000 [thread overview]
Message-ID: <1547000416-144563-1-git-send-email-yuehaibing@huawei.com> (raw)
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 */
next reply other threads:[~2019-01-09 2:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 2:20 YueHaibing [this message]
2019-01-09 9:32 ` [PATCH -next] ALSA: usb-audio: Remove set but not used variable 'first_ch_bits' Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1547000416-144563-1-git-send-email-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=achant@google.com \
--cc=alsa-devel@alsa-project.org \
--cc=jorge.sanjuan@codethink.co.uk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=ruslan.bilovol@gmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).