Blob Blame History Raw
From d8af541139fa135a250c5ae743bfec3b49e97c3a Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Fri, 20 May 2022 16:17:09 -0500
Subject: [PATCH] ASoC: Intel: atom: sst_ipc: remove redundant test
Mime-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8bit
Git-commit: d8af541139fa135a250c5ae743bfec3b49e97c3a
Patch-mainline: v6.0-rc1
References: jsc#PED-850

cppcheck warning:

sound/soc/intel/atom/sst/sst_ipc.c:344:30: style: Condition 'drv_id'
is always true [knownConditionTrueFalse]
 if (msg_high.part.result && drv_id && !msg_high.part.large) {
                             ^
sound/soc/intel/atom/sst/sst_ipc.c:337:13: note: Assuming that
condition 'drv_id==0' is not redundant
 if (drv_id == SST_ASYNC_DRV_ID) {
            ^
sound/soc/intel/atom/sst/sst_ipc.c:344:30: note: Condition 'drv_id' is
always true
 if (msg_high.part.result && drv_id && !msg_high.part.large) {
                             ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 sound/soc/intel/atom/sst/sst_ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c
index 4e8382097e61..78ea67c7a128 100644
--- a/sound/soc/intel/atom/sst/sst_ipc.c
+++ b/sound/soc/intel/atom/sst/sst_ipc.c
@@ -341,7 +341,7 @@ void sst_process_reply_mrfld(struct intel_sst_drv *sst_drv_ctx,
 	}
 
 	/* FW sent short error response for an IPC */
-	if (msg_high.part.result && drv_id && !msg_high.part.large) {
+	if (msg_high.part.result && !msg_high.part.large) {
 		/* 32-bit FW error code in msg_low */
 		dev_err(sst_drv_ctx->dev, "FW sent error response 0x%x", msg_low);
 		sst_wake_up_block(sst_drv_ctx, msg_high.part.result,
-- 
2.35.3