net: mediatek: use dma_addr_t correctly
authorArnd Bergmann <arnd@arndb.de>
Mon, 14 Mar 2016 14:07:10 +0000 (15:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2016 17:06:26 +0000 (13:06 -0400)
dma_alloc_coherent() expects a dma_addr_t pointer as its argument,
not an 'unsigned int', and gcc correctly warns about broken
code in the mtk_init_fq_dma function:

drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_init_fq_dma':
drivers/net/ethernet/mediatek/mtk_eth_soc.c:463:13: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]

This changes the type of the local variable to dma_addr_t.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index ba3afa5d46401215d5d3865dc179f17e37e0ade5..3e42204adfe54ec12654d4d6072ca9650cad73af 100644 (file)
@@ -453,7 +453,7 @@ static inline void mtk_rx_get_desc(struct mtk_rx_dma *rxd,
 /* the qdma core needs scratch memory to be setup */
 static int mtk_init_fq_dma(struct mtk_eth *eth)
 {
-       unsigned int phy_ring_head, phy_ring_tail;
+       dma_addr_t phy_ring_head, phy_ring_tail;
        int cnt = MTK_DMA_SIZE;
        dma_addr_t dma_addr;
        int i;
This page took 0.025466 seconds and 5 git commands to generate.