From: Angelo Dureghello <angelo@sysam.it>
To: vinod.koul@linaro.org
Cc: dmaengine@vger.kernel.org, sfr@canb.auug.org.au,
Angelo Dureghello <angelo@sysam.it>
Subject: [-next,v3] dmaengine: mcf-edma: avoid warning for wrong pointer cast
Date: Fri, 14 Sep 2018 21:13:48 +0200 [thread overview]
Message-ID: <20180914191348.4867-1-angelo@sysam.it> (raw)
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;
next reply other threads:[~2018-09-14 19:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 19:13 Angelo Dureghello [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-09-18 19:16 [-next,v3] dmaengine: mcf-edma: avoid warning for wrong pointer cast Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180914191348.4867-1-angelo@sysam.it \
--to=angelo@sysam.it \
--cc=dmaengine@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=vinod.koul@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox