Skip to content

Commit 537df9a

Browse files
nxpfranklivinodkoul
authored andcommitted
dmaengine: fsl-edma: fix spare build warning
../drivers/dma/fsl-edma-common.c:93:9: sparse: warning: cast removes address space '__iomem' of expression ../drivers/dma/fsl-edma-common.c:101:25: sparse: warning: cast removes address space '__iomem' of expression ... ../drivers/dma/fsl-edma-main.c:557:17: sparse: got restricted __le32 [usertype] Signed-off-by: Frank Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 5dc6044 commit 537df9a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/dma/fsl-edma-common.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,13 @@ struct fsl_edma_engine {
243243

244244
#define edma_readl_chreg(chan, __name) \
245245
edma_readl(chan->edma, \
246-
(void __iomem *)&(container_of(chan->tcd, struct fsl_edma3_ch_reg, tcd)->__name))
246+
(void __iomem *)&(container_of(((__force void *)chan->tcd),\
247+
struct fsl_edma3_ch_reg, tcd)->__name))
247248

248249
#define edma_writel_chreg(chan, val, __name) \
249250
edma_writel(chan->edma, val, \
250-
(void __iomem *)&(container_of(chan->tcd, struct fsl_edma3_ch_reg, tcd)->__name))
251+
(void __iomem *)&(container_of(((__force void *)chan->tcd),\
252+
struct fsl_edma3_ch_reg, tcd)->__name))
251253

252254
#define fsl_edma_get_tcd(_chan, _tcd, _field) ((_tcd)->_field)
253255

drivers/dma/fsl-edma-main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ static int fsl_edma_probe(struct platform_device *pdev)
536536
fsl_chan->pdev = pdev;
537537
vchan_init(&fsl_chan->vchan, &fsl_edma->dma_dev);
538538

539-
edma_write_tcdreg(fsl_chan, 0, csr);
539+
edma_write_tcdreg(fsl_chan, cpu_to_le32(0), csr);
540540
fsl_edma_chan_mux(fsl_chan, 0, false);
541541
}
542542

0 commit comments

Comments
 (0)