Commit 43c633ef authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Vinod Koul

dmaengine: owl: fix register access functions

When building with 'make W=1', clang notices that the computed register
values are never actually written back but instead the wrong variable
is set:

drivers/dma/owl-dma.c:244:6: error: variable 'regval' set but not used [-Werror,-Wunused-but-set-variable]
  244 |         u32 regval;
      |             ^
drivers/dma/owl-dma.c:268:6: error: variable 'regval' set but not used [-Werror,-Wunused-but-set-variable]
  268 |         u32 regval;
      |             ^

Change these to what was most likely intended.

Fixes: 47e20577 ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarPeter Korsgaard <peter@korsgaard.com>
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240322132116.906475-1-arnd@kernel.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent afc89870
...@@ -250,7 +250,7 @@ static void pchan_update(struct owl_dma_pchan *pchan, u32 reg, ...@@ -250,7 +250,7 @@ static void pchan_update(struct owl_dma_pchan *pchan, u32 reg,
else else
regval &= ~val; regval &= ~val;
writel(val, pchan->base + reg); writel(regval, pchan->base + reg);
} }
static void pchan_writel(struct owl_dma_pchan *pchan, u32 reg, u32 data) static void pchan_writel(struct owl_dma_pchan *pchan, u32 reg, u32 data)
...@@ -274,7 +274,7 @@ static void dma_update(struct owl_dma *od, u32 reg, u32 val, bool state) ...@@ -274,7 +274,7 @@ static void dma_update(struct owl_dma *od, u32 reg, u32 val, bool state)
else else
regval &= ~val; regval &= ~val;
writel(val, od->base + reg); writel(regval, od->base + reg);
} }
static void dma_writel(struct owl_dma *od, u32 reg, u32 data) static void dma_writel(struct owl_dma *od, u32 reg, u32 data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment