* [PATCH] ALSA: ali5451: remove redundant variable capture_flag
@ 2020-02-08 22:34 Colin King
2020-02-10 7:31 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-02-08 22:34 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, alsa-devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable capture_flag is only ever assigned values, it is never read
and hence it is redundant. Remove it.
Addresses-Coverity ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/pci/ali5451/ali5451.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index 4f524a9dbbca..4462375d2d82 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -1070,7 +1070,7 @@ static int snd_ali_trigger(struct snd_pcm_substream *substream,
{
struct snd_ali *codec = snd_pcm_substream_chip(substream);
struct snd_pcm_substream *s;
- unsigned int what, whati, capture_flag;
+ unsigned int what, whati;
struct snd_ali_voice *pvoice, *evoice;
unsigned int val;
int do_start;
@@ -1088,7 +1088,7 @@ static int snd_ali_trigger(struct snd_pcm_substream *substream,
return -EINVAL;
}
- what = whati = capture_flag = 0;
+ what = whati = 0;
snd_pcm_group_for_each_entry(s, substream) {
if ((struct snd_ali *) snd_pcm_substream_chip(s) == codec) {
pvoice = s->runtime->private_data;
@@ -1110,8 +1110,6 @@ static int snd_ali_trigger(struct snd_pcm_substream *substream,
evoice->running = 0;
}
snd_pcm_trigger_done(s, substream);
- if (pvoice->mode)
- capture_flag = 1;
}
}
spin_lock(&codec->reg_lock);
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: ali5451: remove redundant variable capture_flag
2020-02-08 22:34 [PATCH] ALSA: ali5451: remove redundant variable capture_flag Colin King
@ 2020-02-10 7:31 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2020-02-10 7:31 UTC (permalink / raw)
To: Colin King
Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, kernel-janitors, linux-kernel
On Sat, 08 Feb 2020 23:34:43 +0100,
Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable capture_flag is only ever assigned values, it is never read
> and hence it is redundant. Remove it.
>
> Addresses-Coverity ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-10 7:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-08 22:34 [PATCH] ALSA: ali5451: remove redundant variable capture_flag Colin King
2020-02-10 7:31 ` 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).