diff mbox

[v2,23/30] dmaengine: s3c24xx: fix pointer cast warnings

Message ID 1474361960-12434-24-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Vinod Koul Sept. 20, 2016, 8:59 a.m. UTC
On some systems, pointer can be large than unsigned int, triggering warning
pointer-to-int-cast on conversion.

drivers/dma/s3c24xx-dma.c: In function 's3c24xx_dma_filter':
drivers/dma/s3c24xx-dma.c:1421:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Use a long value for type conversion.

Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/s3c24xx-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Sept. 20, 2016, 4:36 p.m. UTC | #1
On Tue, Sep 20, 2016 at 02:29:13PM +0530, Vinod Koul wrote:
> On some systems, pointer can be large than unsigned int, triggering warning
> pointer-to-int-cast on conversion.
> 
> drivers/dma/s3c24xx-dma.c: In function 's3c24xx_dma_filter':
> drivers/dma/s3c24xx-dma.c:1421:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> 
> Use a long value for type conversion.
> 
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
>  drivers/dma/s3c24xx-dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c
index b4a7041c4f81..ae1937a32e71 100644
--- a/drivers/dma/s3c24xx-dma.c
+++ b/drivers/dma/s3c24xx-dma.c
@@ -1418,7 +1418,7 @@  bool s3c24xx_dma_filter(struct dma_chan *chan, void *param)
 
 	s3cchan = to_s3c24xx_dma_chan(chan);
 
-	return s3cchan->id == (int)param;
+	return s3cchan->id == (uintptr_t)param;
 }
 EXPORT_SYMBOL(s3c24xx_dma_filter);