summaryrefslogtreecommitdiff
path: root/drivers/dma/xilinx
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-07-12 00:46:09 +0300
committerVinod Koul <vinod.koul@intel.com>2016-07-12 07:33:16 +0300
commit7cdd3587b8628215f377d5d73a39540d94f33dc1 (patch)
tree32222ba14bb7fc3038592c9bdcd5840328d11e8f /drivers/dma/xilinx
parente598e6eb46dd448d9b77a564e4d9664da52e3e1f (diff)
downloadlinux-7cdd3587b8628215f377d5d73a39540d94f33dc1.tar.xz
dmaengine: zynqmp: avoid cast warning
The newly added zynqmp_dma driver produces a warning on 32-bit architectures when dma_addr_t is 64-bit wide: drivers/dma/xilinx/zynqmp_dma.c: In function 'zynqmp_dma_config_sg_ll_desc': drivers/dma/xilinx/zynqmp_dma.c:321:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] ((dma_addr_t)sdesc - (dma_addr_t)chan->desc_pool_v); ^ drivers/dma/xilinx/zynqmp_dma.c:321:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] ((dma_addr_t)sdesc - (dma_addr_t)chan->desc_pool_v); This changes the cast to the more appropriate uintptr_t. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/xilinx')
-rw-r--r--drivers/dma/xilinx/zynqmp_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 59bc1f730a48..f777a5bc0db8 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -318,7 +318,7 @@ static void zynqmp_dma_config_sg_ll_desc(struct zynqmp_dma_chan *chan,
if (prev) {
dma_addr_t addr = chan->desc_pool_p +
- ((dma_addr_t)sdesc - (dma_addr_t)chan->desc_pool_v);
+ ((uintptr_t)sdesc - (uintptr_t)chan->desc_pool_v);
ddesc = prev + 1;
prev->nxtdscraddr = addr;
ddesc->nxtdscraddr = addr + ZYNQMP_DMA_DESC_SIZE(chan);