• Vince Bridgers's avatar
    Altera TSE: Correct typecast issue detected by kbuild test robot · a804ad0e
    Vince Bridgers authored
    This patch addresses a portable pointer arithmetic issue in the
    original submission found by the kbuild test robot.
    
    config: make ARCH=i386 allyesconfig
    
       altera_sgdma.c: In function 'sgdma_txphysaddr':
    >> altera_sgdma.c:393:33: warning: cast from
    >> pointer to integer of different size [-Wpointer-to-int-cast]
         dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc -
                                        ^
    >> altera_sgdma.c:394:5: warning: cast from
    >> pointer to integer of different size [-Wpointer-to-int-cast]
            (dma_addr_t)priv->tx_dma_desc);
            ^
       altera_sgdma.c: In function 'sgdma_rxphysaddr':
    >> altera_sgdma.c:403:33: warning: cast from
    >> pointer to integer of different size [-Wpointer-to-int-cast]
         dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc -
                                        ^
    >> altera_sgdma.c:404:5: warning: cast from
    >> pointer to integer of different size [-Wpointer-to-int-cast]
            (dma_addr_t)priv->rx_dma_desc);
            ^
    Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
    Signed-off-by: default avatarVince Bridgers <vbridgers2013@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a804ad0e
altera_sgdma.c 13.9 KB