Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1244302pxy; Thu, 6 May 2021 03:58:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFERAugyyZiBsvjTDZ+jS3qpzrWVBnefcs69MdGctlkcp+/MoULlthx8bvwnaBl1Nk7pwJ X-Received: by 2002:a50:cdd1:: with SMTP id h17mr4401205edj.178.1620298711658; Thu, 06 May 2021 03:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620298711; cv=none; d=google.com; s=arc-20160816; b=auKyT0cZswxjldYjSsp2I1FeBClQi7B8QXuwM1MO6eGWUDAIdh0grWfiGAiw1r6BNG sfk76p1UhD2FBP1/JxMxfAeAvyaY7f9PP/jXKuGVHNbIKrEdPaCyd8C6nDq/qD6/SaF2 Fn1Yqh6MLLlv7b8R85uPA6cAEv09n8N+JkmLEAKswYYepIbspPwUR1u5+oD5oeFwagbc BLMm5R07m4WMTCyO02GPBB9nEp7BpO/tGG+Lp/VKDhxGMP2zMuHeohZrlsIoiEDbeSzX H1g+U5HsWSqA6QRQ8CX88sZgjnXfAgWf7bozT3XseuNpV3DKHathhVmhQD6LXlU7xgvN Wufw== 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=7Emo4W2L2g2eDGJwwcpxbuuOxc3BnDIVjPIPgvFTS+A=; b=lGwZklEluWnxr9OlMtec/O4y2Rsf7pW8JRIU222rMcu6AwOYKM9SFOpI4kV3GGVXXT E+Bl0mO2lruH0nOVdeV5JBn2iQjAuejNe68Wp2ADs/KGEH5n+aOHKCFAyhd53UBlZZlC rkTTzF8eXuggFNj/YS3eI3ualThJb2l+Vhy3TCWdEn0iHm+iLb4pc8OmU1PawBeybXsn e426H/lL7JR02wGk023hdGh0iZO0LsT+BHA6B3qjLLk1MYiMg4VoeDzfugdE6yzk1tgl 1WzZRvLquAiLTu6og1nzVjTIsjbVGZU7/N7p3Vz05JW3jXLOWY4e13yxOg+P+m8vtbC1 ShCA== 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 u14si1850564ejb.680.2021.05.06.03.58.08; Thu, 06 May 2021 03:58:31 -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 S234569AbhEFK5v (ORCPT + 99 others); Thu, 6 May 2021 06:57:51 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:49455 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234508AbhEFK5v (ORCPT ); Thu, 6 May 2021 06:57:51 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UXyl1SF_1620298592; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UXyl1SF_1620298592) by smtp.aliyun-inc.com(127.0.0.1); Thu, 06 May 2021 18:56:50 +0800 From: Jiapeng Chong To: lgirdwood@gmail.com Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] ASoC: amd: renoir: Remove redundant assignment to pdm_ctrl and pdm_enable and pdm_dma_enable Date: Thu, 6 May 2021 18:56:30 +0800 Message-Id: <1620298590-29749-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable pdm_ctrl and pdm_enable and pdm_dma_enable are set to '0x00', but they are overwritten later on, so these are redundant assignments that can be removed. Clean up the following clang-analyzer warning: sound/soc/amd/renoir/acp3x-pdm-dma.c:148:2: warning: Value stored to 'pdm_dma_enable' is never read [clang-analyzer-deadcode.DeadStores]. sound/soc/amd/renoir/acp3x-pdm-dma.c:147:2: warning: Value stored to 'pdm_enable' is never read [clang-analyzer-deadcode.DeadStores]. sound/soc/amd/renoir/acp3x-pdm-dma.c:80:2: warning: Value stored to 'pdm_ctrl' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- sound/soc/amd/renoir/acp3x-pdm-dma.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c index 4c2810e..bd20622b 100644 --- a/sound/soc/amd/renoir/acp3x-pdm-dma.c +++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c @@ -77,7 +77,6 @@ static void enable_pdm_clock(void __iomem *acp_base) u32 pdm_clk_enable, pdm_ctrl; pdm_clk_enable = ACP_PDM_CLK_FREQ_MASK; - pdm_ctrl = 0x00; rn_writel(pdm_clk_enable, acp_base + ACP_WOV_CLK_CTRL); pdm_ctrl = rn_readl(acp_base + ACP_WOV_MISC_CTRL); @@ -144,9 +143,6 @@ static int stop_pdm_dma(void __iomem *acp_base) u32 pdm_enable, pdm_dma_enable; int timeout; - pdm_enable = 0x00; - pdm_dma_enable = 0x00; - pdm_enable = rn_readl(acp_base + ACP_WOV_PDM_ENABLE); pdm_dma_enable = rn_readl(acp_base + ACP_WOV_PDM_DMA_ENABLE); if (pdm_dma_enable & 0x01) { -- 1.8.3.1