Skip to content

Commit 43c633e

Browse files
arndbvinodkoul
authored andcommitted
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: 47e2057 ("dmaengine: Add Actions Semi Owl family S900 DMA driver") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Peter Korsgaard <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent afc8987 commit 43c633e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/owl-dma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ static void pchan_update(struct owl_dma_pchan *pchan, u32 reg,
250250
else
251251
regval &= ~val;
252252

253-
writel(val, pchan->base + reg);
253+
writel(regval, pchan->base + reg);
254254
}
255255

256256
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)
274274
else
275275
regval &= ~val;
276276

277-
writel(val, od->base + reg);
277+
writel(regval, od->base + reg);
278278
}
279279

280280
static void dma_writel(struct owl_dma *od, u32 reg, u32 data)

0 commit comments

Comments
 (0)