* [-next,v3] dmaengine: mcf-edma: avoid warning for wrong pointer cast
@ 2018-09-14 19:13 Angelo Dureghello
0 siblings, 0 replies; 2+ messages in thread
From: Angelo Dureghello @ 2018-09-14 19:13 UTC (permalink / raw)
To: vinod.koul; +Cc: dmaengine, sfr, Angelo Dureghello
This patch fixes the following compilation warning
reported during x86_64 allmodconfig build:
drivers/dma/mcf-edma.c: In function 'mcf_edma_filter_fn':
drivers/dma/mcf-edma.c:296:33: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
return (mcf_chan->slave_id == (u32)param);
Reported-By: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
---
Changes for v2:
- added Reported-By
Changes for v3:
- added more details about the patch
- changed channel request cast using uintptr_t
---
drivers/dma/mcf-edma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma.c
index 4d30d5302649..5de1b07eddff 100644
--- a/drivers/dma/mcf-edma.c
+++ b/drivers/dma/mcf-edma.c
@@ -293,7 +293,7 @@ bool mcf_edma_filter_fn(struct dma_chan *chan, void *param)
if (chan->device->dev->driver == &mcf_edma_driver.driver) {
struct fsl_edma_chan *mcf_chan = to_fsl_edma_chan(chan);
- return (mcf_chan->slave_id == (u32)param);
+ return (mcf_chan->slave_id == (uintptr_t)param);
}
return false;
^ permalink raw reply related [flat|nested] 2+ messages in thread* [-next,v3] dmaengine: mcf-edma: avoid warning for wrong pointer cast
@ 2018-09-18 19:16 Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2018-09-18 19:16 UTC (permalink / raw)
To: Angelo Dureghello; +Cc: dmaengine, sfr
On 14-09-18, 21:13, Angelo Dureghello wrote:
> This patch fixes the following compilation warning
> reported during x86_64 allmodconfig build:
>
> drivers/dma/mcf-edma.c: In function 'mcf_edma_filter_fn':
> drivers/dma/mcf-edma.c:296:33: warning: cast from pointer to
> integer of different size [-Wpointer-to-int-cast]
> return (mcf_chan->slave_id == (u32)param);
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-18 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-14 19:13 [-next,v3] dmaengine: mcf-edma: avoid warning for wrong pointer cast Angelo Dureghello
-- strict thread matches above, loose matches on Subject: below --
2018-09-18 19:16 Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox