From: Yang Li <yang.lee@linux.alibaba.com>
To: perex@perex.cz
Cc: srinivas.kandagatla@linaro.org, bgoswami@codeaurora.org,
lgirdwood@gmail.com, broonie@kernel.org, tiwai@suse.com,
nathan@kernel.org, ndesaulniers@google.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com,
Yang Li <yang.lee@linux.alibaba.com>
Subject: [PATCH] ASoC: q6dsp: q6afe: remove unneeded dead-store initialization
Date: Sun, 25 Apr 2021 18:12:33 +0800 [thread overview]
Message-ID: <1619345553-29781-1-git-send-email-yang.lee@linux.alibaba.com> (raw)
Variables 'wait' and 'port_id' are being initialized, however the
values are never read and updated later on, hence the redundant
initializations can be removed.
Cleans up clang warnings:
sound/soc/qcom/qdsp6/q6afe.c:933:21: warning: Value stored to 'wait'
during its initialization is never read
sound/soc/qcom/qdsp6/q6afe.c:1186:6: warning: Value stored to 'port_id'
during its initialization is never read
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
sound/soc/qcom/qdsp6/q6afe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index cad1cd1..442bf27 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -930,7 +930,7 @@ int q6afe_get_port_id(int index)
static int afe_apr_send_pkt(struct q6afe *afe, struct apr_pkt *pkt,
struct q6afe_port *port, uint32_t rsp_opcode)
{
- wait_queue_head_t *wait = &port->wait;
+ wait_queue_head_t *wait;
struct aprv2_ibasic_rsp_result_t *result;
int ret;
@@ -1183,7 +1183,7 @@ int q6afe_port_stop(struct q6afe_port *port)
struct afe_port_cmd_device_stop *stop;
struct q6afe *afe = port->afe;
struct apr_pkt *pkt;
- int port_id = port->id;
+ int port_id;
int ret = 0;
int index, pkt_size;
void *p;
--
1.8.3.1
next reply other threads:[~2021-04-25 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-25 10:12 Yang Li [this message]
2021-04-27 18:50 ` [PATCH] ASoC: q6dsp: q6afe: remove unneeded dead-store initialization Nick Desaulniers
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=1619345553-29781-1-git-send-email-yang.lee@linux.alibaba.com \
--to=yang.lee@linux.alibaba.com \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=broonie@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=perex@perex.cz \
--cc=srinivas.kandagatla@linaro.org \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).