mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
ASoC: amd: renoir: Remove redundant assignment to pdm_ctrl and pdm_enable and pdm_dma_enable
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 <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/1620298590-29749-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
604e517844
commit
2fa74b31bb
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user