dmaengine: s3c24xx: fix pointer cast warnings
authorVinod Koul <vinod.koul@intel.com>
Wed, 14 Sep 2016 10:51:32 +0000 (16:21 +0530)
committerVinod Koul <vinod.koul@intel.com>
Mon, 26 Sep 2016 17:01:59 +0000 (22:31 +0530)
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.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/s3c24xx-dma.c

index b4a7041c4f813b44d6e3e0e61baaeec1aa1fb849..ae1937a32e7102104aaf5fc10afa9ae5762e9a9f 100644 (file)
@@ -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);