]> git.baikalelectronics.ru Git - kernel.git/commit
Altera TSE: Correct typecast issue detected by kbuild test robot
authorVince Bridgers <vbridgers2013@gmail.com>
Fri, 21 Mar 2014 01:43:16 +0000 (20:43 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Mar 2014 16:45:00 +0000 (12:45 -0400)
commit0484a293402b7ed4564a23f117b15873ef3ff689
treee3bdc0bcc07f8b594ea00a526dce93075d82d6f5
parent01e1c958564982d24b7d1bd57b2d54af939925bf
Altera TSE: Correct typecast issue detected by kbuild test robot

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: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/altera/altera_sgdma.c