linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
	Hui Wang <hui.wang@canonical.com>
Subject: [PATCH 01/17] ASoC: amd: renoir: acp3x-pdm-dma: remove unnecessary assignments
Date: Fri, 26 Mar 2021 16:59:11 -0500	[thread overview]
Message-ID: <20210326215927.936377-2-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com>

cppcheck warning:

sound/soc/amd/renoir/acp3x-pdm-dma.c:132:17: style: Variable
'pdm_dma_enable' is assigned a value that is never
used. [unreadVariable]
 pdm_dma_enable = 0x00;
                ^
sound/soc/amd/renoir/acp3x-pdm-dma.c:156:18: style: Variable
'pdm_dma_enable' is assigned a value that is never
used. [unreadVariable]
  pdm_dma_enable = 0x00;
                 ^

indeed those values are never used because the timeout is reset.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/amd/renoir/acp3x-pdm-dma.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c
index 7b14d9a81b97..1acd20439399 100644
--- a/sound/soc/amd/renoir/acp3x-pdm-dma.c
+++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c
@@ -129,7 +129,6 @@ static int start_pdm_dma(void __iomem *acp_base)
 	enable_pdm_clock(acp_base);
 	rn_writel(pdm_enable, acp_base + ACP_WOV_PDM_ENABLE);
 	rn_writel(pdm_dma_enable, acp_base + ACP_WOV_PDM_DMA_ENABLE);
-	pdm_dma_enable = 0x00;
 	timeout = 0;
 	while (++timeout < ACP_COUNTER) {
 		pdm_dma_enable = rn_readl(acp_base + ACP_WOV_PDM_DMA_ENABLE);
@@ -153,7 +152,6 @@ static int stop_pdm_dma(void __iomem *acp_base)
 	if (pdm_dma_enable & 0x01) {
 		pdm_dma_enable = 0x02;
 		rn_writel(pdm_dma_enable, acp_base + ACP_WOV_PDM_DMA_ENABLE);
-		pdm_dma_enable = 0x00;
 		timeout = 0;
 		while (++timeout < ACP_COUNTER) {
 			pdm_dma_enable = rn_readl(acp_base +
-- 
2.25.1


  reply	other threads:[~2021-03-26 22:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 21:59 [PATCH 00/17] ASoC: remove cppcheck warnings for multiple SOCs Pierre-Louis Bossart
2021-03-26 21:59 ` Pierre-Louis Bossart [this message]
2021-03-26 21:59 ` [PATCH 02/17] ASoC: atmel: fix shadowed variable Pierre-Louis Bossart
2021-03-29  7:38   ` Codrin.Ciubotariu
2021-03-26 21:59 ` [PATCH 03/17] ASoC: atmel: atmel-i2s: remove useless initialization Pierre-Louis Bossart
2021-03-29  7:32   ` Codrin.Ciubotariu
2021-03-26 21:59 ` [PATCH 04/17] ASoC: bcm: cygnus_ssp: " Pierre-Louis Bossart
2021-03-26 21:59 ` [PATCH 05/17] ASoC: meson: axg-tdmin: remove useless assignment Pierre-Louis Bossart
2021-03-26 21:59 ` [PATCH 06/17] ASoC: meson: axg-tdmout: " Pierre-Louis Bossart
2021-03-26 21:59 ` [PATCH 07/17] ASoC: pxa: " Pierre-Louis Bossart
2021-03-26 21:59 ` [PATCH 08/17] ASoC: sti: sti_uniperif: add missing error check Pierre-Louis Bossart
2021-03-29  8:01   ` Arnaud POULIQUEN
2021-03-26 21:59 ` [PATCH 09/17] ASoC: sti: uniperif: align function prototypes Pierre-Louis Bossart
2021-03-29  8:00   ` Arnaud POULIQUEN
2021-03-26 21:59 ` [PATCH 10/17] ASoC: stm: stm32_adfsdm: fix snprintf format string Pierre-Louis Bossart
2021-03-26 21:59 ` [PATCH 11/17] ASoC: sunxi: sun8i-codec: clarify expression Pierre-Louis Bossart
2021-03-29  8:12   ` Maxime Ripard
2021-03-26 21:59 ` [PATCH 12/17] ASoC: tegra: tegra20_das: " Pierre-Louis Bossart
2021-03-29  7:14   ` Thierry Reding
2021-03-26 21:59 ` [PATCH 13/17] ASoC: tegra: tegra20_das: align function prototypes Pierre-Louis Bossart
2021-03-29  7:14   ` Thierry Reding
2021-03-26 21:59 ` [PATCH 14/17] ASoC: ti: omap-abe-twl6040: remove useless assignment Pierre-Louis Bossart
2021-03-29  5:52   ` Péter Ujfalusi
2021-03-26 21:59 ` [PATCH 15/17] ASoC: ti: omap-mcsp: remove duplicate test Pierre-Louis Bossart
2021-03-29  5:56   ` Péter Ujfalusi
2021-03-26 21:59 ` [PATCH 16/17] ASoC: ux500: mop500: rename shadowing variable Pierre-Louis Bossart
2021-03-26 21:59 ` [PATCH 17/17] ASoC: ux500: mop500: align function prototype Pierre-Louis Bossart
2021-04-01 10:16 ` [PATCH 00/17] ASoC: remove cppcheck warnings for multiple SOCs 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=20210326215927.936377-2-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=hui.wang@canonical.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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).