[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231127225542.2744711-3-Frank.Li@nxp.com>
Date: Mon, 27 Nov 2023 17:55:38 -0500
From: Frank Li <Frank.Li@....com>
To: frank.li@....com, vkoul@...nel.org
Cc: devicetree@...r.kernel.org, dmaengine@...r.kernel.org,
imx@...ts.linux.dev, joy.zou@....com,
krzysztof.kozlowski+dt@...aro.org, linux-kernel@...r.kernel.org,
peng.fan@....com, robh+dt@...nel.org, shenwei.wang@....com
Subject: [PATCH v3 2/6] 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 <Frank.Li@....com>
---
drivers/dma/fsl-edma-common.h | 6 ++++--
drivers/dma/fsl-edma-main.c | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h
index ce779274d81e5..fb45c7d4c1f4c 100644
--- a/drivers/dma/fsl-edma-common.h
+++ b/drivers/dma/fsl-edma-common.h
@@ -243,11 +243,13 @@ struct fsl_edma_engine {
#define edma_readl_chreg(chan, __name) \
edma_readl(chan->edma, \
- (void __iomem *)&(container_of(chan->tcd, struct fsl_edma3_ch_reg, tcd)->__name))
+ (void __iomem *)&(container_of(((__force void *)chan->tcd),\
+ struct fsl_edma3_ch_reg, tcd)->__name))
#define edma_writel_chreg(chan, val, __name) \
edma_writel(chan->edma, val, \
- (void __iomem *)&(container_of(chan->tcd, struct fsl_edma3_ch_reg, tcd)->__name))
+ (void __iomem *)&(container_of(((__force void *)chan->tcd),\
+ struct fsl_edma3_ch_reg, tcd)->__name))
#define fsl_edma_get_tcd(_chan, _tcd, _field) ((_tcd)->_field)
diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c
index f53b0ec17bcbc..86b293eba27c2 100644
--- a/drivers/dma/fsl-edma-main.c
+++ b/drivers/dma/fsl-edma-main.c
@@ -537,7 +537,7 @@ static int fsl_edma_probe(struct platform_device *pdev)
fsl_chan->pdev = pdev;
vchan_init(&fsl_chan->vchan, &fsl_edma->dma_dev);
- edma_write_tcdreg(fsl_chan, 0, csr);
+ edma_write_tcdreg(fsl_chan, cpu_to_le32(0), csr);
fsl_edma_chan_mux(fsl_chan, 0, false);
}
--
2.34.1
Powered by blists - more mailing lists