drivers/dma/iop-adma.c cast build warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On i386, when CONFIG_ARCH_DMA_ADDR_T_64BIT=y,
but long and void* are only 32 bits, there are a few build warnings:

  CC [M]  drivers/dma/iop-adma.o
../drivers/dma/iop-adma.c: In function 'iop_adma_alloc_chan_resources':
../drivers/dma/iop-adma.c:448: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:450:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    (dma_addr_t) &hw_desc[idx * IOP_ADMA_SLOT_SIZE];
    ^
In file included from ../include/linux/printk.h:328:0,
                 from ../include/linux/kernel.h:15,
                 from ../include/linux/list.h:9,
                 from ../include/linux/module.h:12,
                 from ../drivers/dma/iop-adma.c:13:
../drivers/dma/iop-adma.c: In function 'iop_adma_probe':
../drivers/dma/iop-adma.c:1302:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (void *) adev->dma_desc_pool);
   ^

This is on linux-next 20200420.

Are DMA addresses for this driver/hw device limited to 32 bits?

thanks.
-- 
~Randy
Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux