* [PATCH] ALSA: emu10k1: remove redundant assignment to tmp
@ 2017-10-17 12:18 Colin King
2017-10-17 17:16 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-10-17 12:18 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, alsa-devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The assignment to variable tmp is redundant as the value is never
read and a new value is assigned to tmp in the following for-loop,
so remove the assignment.
Cleans up clang warning: Value stored to 'tmp' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/pci/emu10k1/emuproc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c
index cf05229b569b..bde0d1954f56 100644
--- a/sound/pci/emu10k1/emuproc.c
+++ b/sound/pci/emu10k1/emuproc.c
@@ -280,7 +280,6 @@ static void snd_emu10k1_proc_rates_read(struct snd_info_entry *entry,
struct snd_emu10k1 *emu = entry->private_data;
unsigned int val, tmp, n;
val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0);
- tmp = (val >> 16) & 0x8;
for (n = 0; n < 4; n++) {
tmp = val >> (16 + (n*4));
if (tmp & 0x8) snd_iprintf(buffer, "Channel %d: Rate=%d\n", n, samplerate[tmp & 0x7]);
--
2.14.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: emu10k1: remove redundant assignment to tmp
2017-10-17 12:18 [PATCH] ALSA: emu10k1: remove redundant assignment to tmp Colin King
@ 2017-10-17 17:16 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2017-10-17 17:16 UTC (permalink / raw)
To: Colin King; +Cc: alsa-devel, Jaroslav Kysela, kernel-janitors, linux-kernel
On Tue, 17 Oct 2017 14:18:36 +0200,
Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment to variable tmp is redundant as the value is never
> read and a new value is assigned to tmp in the following for-loop,
> so remove the assignment.
> Cleans up clang warning: Value stored to 'tmp' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-17 17:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 12:18 [PATCH] ALSA: emu10k1: remove redundant assignment to tmp Colin King
2017-10-17 17:16 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®