* [PATCH] echoaudio: remove redundant initialization of pointer 'pipe'
@ 2018-03-12 15:01 Colin King
2018-03-12 15:06 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-03-12 15:01 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Takashi Sakamoto, Arvind Yadav,
alsa-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointer 'pipe' is being initialized with a value that is never
read and it is re-assigned later, hence the initialization is redundant
and can be removed. Also remove pointer 'runtime' as it is no longer
required.
Cleans up clang warning:
sound/pci/echoaudio/echoaudio.c:740:20: warning: Value stored to 'pipe'
during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/pci/echoaudio/echoaudio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index d68f99e076a8..0935a5c8741f 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -736,8 +736,7 @@ static int pcm_prepare(struct snd_pcm_substream *substream)
static int pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct echoaudio *chip = snd_pcm_substream_chip(substream);
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct audiopipe *pipe = runtime->private_data;
+ struct audiopipe *pipe;
int i, err;
u32 channelmask = 0;
struct snd_pcm_substream *s;
--
2.15.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] echoaudio: remove redundant initialization of pointer 'pipe'
2018-03-12 15:01 [PATCH] echoaudio: remove redundant initialization of pointer 'pipe' Colin King
@ 2018-03-12 15:06 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2018-03-12 15:06 UTC (permalink / raw)
To: Colin King
Cc: alsa-devel, Arvind Yadav, Jaroslav Kysela, Takashi Sakamoto,
kernel-janitors, linux-kernel
On Mon, 12 Mar 2018 16:01:00 +0100,
Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer 'pipe' is being initialized with a value that is never
> read and it is re-assigned later, hence the initialization is redundant
> and can be removed. Also remove pointer 'runtime' as it is no longer
> required.
>
> Cleans up clang warning:
> sound/pci/echoaudio/echoaudio.c:740:20: warning: Value stored to 'pipe'
> during its initialization 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:[~2018-03-12 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 15:01 [PATCH] echoaudio: remove redundant initialization of pointer 'pipe' Colin King
2018-03-12 15:06 ` 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®