From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> To: oder_chiou@realtek.com Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Subject: [PATCH] ASoC: rt286: Remove redundant assignment to d_len_code Date: Thu, 6 May 2021 18:58:55 +0800 [thread overview] Message-ID: <1620298735-31708-1-git-send-email-jiapeng.chong@linux.alibaba.com> (raw) Variable d_len_code is set to zero, but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: sound/soc/codecs/rt286.c:728:2: warning: Value stored to 'd_len_code' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> --- sound/soc/codecs/rt286.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 802f485..caa7208 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -725,7 +725,6 @@ static int rt286_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - d_len_code = 0; switch (params_width(params)) { /* bit 6:4 Bits per Sample */ case 16: -- 1.8.3.1
WARNING: multiple messages have this Message-ID (diff)
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> To: oder_chiou@realtek.com Cc: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, alsa-devel@alsa-project.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, tiwai@suse.com, broonie@kernel.org Subject: [PATCH] ASoC: rt286: Remove redundant assignment to d_len_code Date: Thu, 6 May 2021 18:58:55 +0800 [thread overview] Message-ID: <1620298735-31708-1-git-send-email-jiapeng.chong@linux.alibaba.com> (raw) Variable d_len_code is set to zero, but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: sound/soc/codecs/rt286.c:728:2: warning: Value stored to 'd_len_code' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> --- sound/soc/codecs/rt286.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 802f485..caa7208 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -725,7 +725,6 @@ static int rt286_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - d_len_code = 0; switch (params_width(params)) { /* bit 6:4 Bits per Sample */ case 16: -- 1.8.3.1
next reply other threads:[~2021-05-06 10:59 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-06 10:58 Jiapeng Chong [this message] 2021-05-06 10:58 ` [PATCH] ASoC: rt286: Remove redundant assignment to d_len_code Jiapeng Chong 2021-05-11 8:25 ` Mark Brown 2021-05-11 8:25 ` Mark Brown
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=1620298735-31708-1-git-send-email-jiapeng.chong@linux.alibaba.com \ --to=jiapeng.chong@linux.alibaba.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=oder_chiou@realtek.com \ --cc=perex@perex.cz \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.