Re: [PATCH -next] dmaengine: iop-adma: Fix pointer cast warnings

From: Vinod Koul
Date: Fri Sep 18 2020 - 03:25:32 EST


On 18-08-20, 19:51, YueHaibing wrote:
> drivers/dma/iop-adma.c: In function ‘iop_adma_alloc_chan_resources’:
> drivers/dma/iop-adma.c:447:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> hw_desc = (char *) iop_chan->device->dma_desc_pool;
> ^
> drivers/dma/iop-adma.c:449:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> (dma_addr_t) &hw_desc[idx * IOP_ADMA_SLOT_SIZE];
> ^
> drivers/dma/iop-adma.c: In function ‘iop_adma_probe’:
> drivers/dma/iop-adma.c:1301:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> (void *) adev->dma_desc_pool);
>
> Use dma_addr_t for dma_desc_pool, and %pad to print dma_addr_t.

Applied, thanks

--
~Vinod