Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2760800pxy; Sun, 25 Apr 2021 03:21:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzHPs8Pdd/OJBoAnFFC5h7Zq6KcjGheYjIUYk/8im+2I2D7tE1zmeet6WMpK53XYmP2UIa X-Received: by 2002:a50:e607:: with SMTP id y7mr15161066edm.18.1619346074236; Sun, 25 Apr 2021 03:21:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619346074; cv=none; d=google.com; s=arc-20160816; b=EDFXQIjDRju1zlchavnBrzVPjV9nWs3kQXUwu7Ds2J+w2KufB4pzJZhDTojgL7S/OA H9QeS0afW8lgkHzvUkxGUOiBTtTslxGjsNi5gLwIZfKkDAlQPfoYGLdETWCISp3OpKjI jZQl6PCMLnSwg5GDEbfeX67uuetRw+4ToydxchlDPUqjRtxC1Or98YWfgm9HBnp/Gkfk BID2jSyJKyuaqL5CKTigZ9UMqWJzPANYvGKaguu0oHim/bPFoVZQF+2wKGi9d6FFrDoa mAN+3QvEiaA/+XNCaOLWz4D4n20OdYCHRGw1IMT4vW+dOUfyURdp+npLqn1mubE+85Wo ZSAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=nGMTlOkhTKF1MntNjtto7WH1VbiGB8nVrjGVQwkdSM4=; b=cKFSdIhhNo7Ov+zuGQL7GJP1X2tR/gPPFYYUpjslT55iJLv00orLXonU3o2Hneg4h0 5gBTYS0vCuAkboRqwbY80+vuKg9Tg83rhfMyshGytvBOj1A9znUYOnboEe4tmG8mzLJn XfZPWGG6Nm8PDFXgfx24NyDvP1ajHdy0QsqiuAhp8BSbkWEVDMdR9w37UheniJNjLl5x d8wsGjN5Et7zHLWk6cG4JJLXpHmedkS54fKs5R9QGYlhrkGNB9S+99sbNhmBvuCm/7iJ 8DrBiGBEs3AQxBDpuWlOTGJDL/FDheXewx0nV0MaTyPVSGnBAhrvY7cM23ogoLwFCSX2 1ooQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si10329008edw.115.2021.04.25.03.20.21; Sun, 25 Apr 2021 03:21:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbhDYKNU (ORCPT + 99 others); Sun, 25 Apr 2021 06:13:20 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:33261 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229466AbhDYKNU (ORCPT ); Sun, 25 Apr 2021 06:13:20 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R431e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0UWg2GZT_1619345556; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UWg2GZT_1619345556) by smtp.aliyun-inc.com(127.0.0.1); Sun, 25 Apr 2021 18:12:37 +0800 From: Yang Li 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 Subject: [PATCH] ASoC: q6dsp: q6afe: remove unneeded dead-store initialization Date: Sun, 25 Apr 2021 18:12:33 +0800 Message-Id: <1619345553-29781-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Yang Li --- 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