From: <zhang.songyi@zte.com.cn>
To: <agross@kernel.org>
Cc: <andersson@kernel.org>, <konrad.dybcio@somainline.org>,
<vkoul@kernel.org>, <yung-chuan.liao@linux.intel.com>,
<pierre-louis.bossart@linux.intel.com>, <sanyog.r.kale@intel.com>,
<linux-arm-msm@vger.kernel.org>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>, <jiang.xuexin@zte.com.cn>,
<xue.zhihong@zte.com.cn>, <zhang.songyi@zte.com.cn>
Subject: [PATCH linux-next] soundwire: qcom: remove redundant ret variable
Date: Wed, 2 Nov 2022 22:08:27 +0800 (CST) [thread overview]
Message-ID: <202211022208274530566@zte.com.cn> (raw)
From ebc0be30e0c49d2d54a9aaa064c7f742e99e8eb2 Mon Sep 17 00:00:00 2001
From: zhang songyi <zhang.songyi@zte.com.cn>
Date: Wed, 2 Nov 2022 22:08:48 +0800
Subject: [PATCH linux-next] soundwire: qcom: remove redundant ret variable
Return value from swrm_get_packed_reg_val() directly instead of taking
this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
drivers/soundwire/qcom.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 335424870290..d92f421d38c8 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -260,7 +260,6 @@ static int qcom_swrm_cpu_reg_write(struct qcom_swrm_ctrl *ctrl, int reg,
static u32 swrm_get_packed_reg_val(u8 *cmd_id, u8 cmd_data,
u8 dev_addr, u16 reg_addr)
{
- u32 val;
u8 id = *cmd_id;
if (id != SWR_BROADCAST_CMD_ID) {
@@ -270,9 +269,8 @@ static u32 swrm_get_packed_reg_val(u8 *cmd_id, u8 cmd_data,
id = 0;
*cmd_id = id;
}
- val = SWRM_REG_VAL_PACK(cmd_data, dev_addr, id, reg_addr);
- return val;
+ return SWRM_REG_VAL_PACK(cmd_data, dev_addr, id, reg_addr);
}
static int swrm_wait_for_rd_fifo_avail(struct qcom_swrm_ctrl *swrm)
--
2.15.2
reply other threads:[~2022-11-02 14:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202211022208274530566@zte.com.cn \
--to=zhang.songyi@zte.com.cn \
--cc=agross@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=andersson@kernel.org \
--cc=jiang.xuexin@zte.com.cn \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sanyog.r.kale@intel.com \
--cc=vkoul@kernel.org \
--cc=xue.zhihong@zte.com.cn \
--cc=yung-chuan.liao@linux.intel.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