i825xx: znet: fix compiler warnings when building a 64-bit kernel
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 14 Sep 2012 00:33:48 +0000 (00:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Sep 2012 19:45:23 +0000 (15:45 -0400)
When building 64-bit kernel with this driver we get following warnings from
the compiler:

drivers/net/ethernet/i825xx/znet.c: In function â€˜hardware_init’:
drivers/net/ethernet/i825xx/znet.c:863:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/net/ethernet/i825xx/znet.c:870:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Fix these by calling isa_virt_to_bus() before passing the pointers to
set_dma_addr().

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/i825xx/znet.c

index ba4e0cea3506f80da5cc36a69f22994a7a3e470e..c9479e081b8aa0507a980d6bb1bc11af1d1adbc0 100644 (file)
@@ -865,14 +865,14 @@ static void hardware_init(struct net_device *dev)
        disable_dma(znet->rx_dma);              /* reset by an interrupting task. */
        clear_dma_ff(znet->rx_dma);
        set_dma_mode(znet->rx_dma, DMA_RX_MODE);
-       set_dma_addr(znet->rx_dma, (unsigned int) znet->rx_start);
+       set_dma_addr(znet->rx_dma, isa_virt_to_bus(znet->rx_start));
        set_dma_count(znet->rx_dma, RX_BUF_SIZE);
        enable_dma(znet->rx_dma);
        /* Now set up the Tx channel. */
        disable_dma(znet->tx_dma);
        clear_dma_ff(znet->tx_dma);
        set_dma_mode(znet->tx_dma, DMA_TX_MODE);
-       set_dma_addr(znet->tx_dma, (unsigned int) znet->tx_start);
+       set_dma_addr(znet->tx_dma, isa_virt_to_bus(znet->tx_start));
        set_dma_count(znet->tx_dma, znet->tx_buf_len<<1);
        enable_dma(znet->tx_dma);
        release_dma_lock(flags);