• Arnd Bergmann's avatar
    davinci_cpdma: don't cast dma_addr_t to pointer · c653f61a
    Arnd Bergmann authored
    dma_addr_t may be 64-bit wide on 32-bit architectures, so it is not
    valid to cast between it and a pointer:
    
    drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_submit_si':
    drivers/net/ethernet/ti/davinci_cpdma.c:1047:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
    drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_idle_submit_mapped':
    drivers/net/ethernet/ti/davinci_cpdma.c:1114:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
    drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_submit_mapped':
    drivers/net/ethernet/ti/davinci_cpdma.c:1164:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
    
    Solve this by using two separate members in 'struct submit_info'.
    Since this avoids the use of the 'flag' member, the structure does
    not even grow in typical configurations.
    
    Fixes: 6670acac ("net: ethernet: ti: davinci_cpdma: add dma mapped submit")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c653f61a
davinci_cpdma.c 34.6 KB