* [PATCH][next] ALSA: echoaudio: remove redundant assignment to variable clock
@ 2024-02-21 11:38 Colin Ian King
2024-02-22 9:05 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-02-21 11:38 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, linux-sound; +Cc: kernel-janitors, linux-kernel
The variable clock is being assigned a value that is never read,
it is being re-assigned a new value in every case in the following
switch statement. The assignment is redundant and can be removed.
Cleans up clang scan build warning:
sound/pci/echoaudio/echoaudio_3g.c:277:2: warning: Value stored
to 'clock' is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
sound/pci/echoaudio/echoaudio_3g.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/pci/echoaudio/echoaudio_3g.c b/sound/pci/echoaudio/echoaudio_3g.c
index cc3c79387194..18b4d4b4d38d 100644
--- a/sound/pci/echoaudio/echoaudio_3g.c
+++ b/sound/pci/echoaudio/echoaudio_3g.c
@@ -274,7 +274,6 @@ static int set_sample_rate(struct echoaudio *chip, u32 rate)
chip->digital_mode == DIGITAL_MODE_ADAT))
return -EINVAL;
- clock = 0;
control_reg = le32_to_cpu(chip->comm_page->control_register);
control_reg &= E3G_CLOCK_CLEAR_MASK;
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] ALSA: echoaudio: remove redundant assignment to variable clock
2024-02-21 11:38 [PATCH][next] ALSA: echoaudio: remove redundant assignment to variable clock Colin Ian King
@ 2024-02-22 9:05 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-02-22 9:05 UTC (permalink / raw)
To: Colin Ian King
Cc: Jaroslav Kysela, Takashi Iwai, linux-sound, kernel-janitors,
linux-kernel
On Wed, 21 Feb 2024 12:38:09 +0100,
Colin Ian King wrote:
>
> The variable clock is being assigned a value that is never read,
> it is being re-assigned a new value in every case in the following
> switch statement. The assignment is redundant and can be removed.
>
> Cleans up clang scan build warning:
> sound/pci/echoaudio/echoaudio_3g.c:277:2: warning: Value stored
> to 'clock' is never read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-22 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-21 11:38 [PATCH][next] ALSA: echoaudio: remove redundant assignment to variable clock Colin Ian King
2024-02-22 9:05 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox