X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fmediatek%2Fpatches-4.4%2F0062-net-mediatek-use-dma_addr_t-correctly.patch;fp=target%2Flinux%2Fmediatek%2Fpatches-4.4%2F0062-net-mediatek-use-dma_addr_t-correctly.patch;h=c44813068fc6c9dc4217a5066346863aebcff1e5;hb=22297b8a8173e309ead83a4f91bd9de9a37edbd1;hp=0000000000000000000000000000000000000000;hpb=448392dc3dd5f5816c71d866e36767a610d78a2a;p=openwrt.git diff --git a/target/linux/mediatek/patches-4.4/0062-net-mediatek-use-dma_addr_t-correctly.patch b/target/linux/mediatek/patches-4.4/0062-net-mediatek-use-dma_addr_t-correctly.patch new file mode 100644 index 0000000000..c44813068f --- /dev/null +++ b/target/linux/mediatek/patches-4.4/0062-net-mediatek-use-dma_addr_t-correctly.patch @@ -0,0 +1,35 @@ +From 26c749e825e87e8be46498be7ac425e83b0f22c6 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Mon, 14 Mar 2016 15:07:10 +0100 +Subject: [PATCH 62/78] net: mediatek: use dma_addr_t correctly + +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 +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +index c2c2e206..a005bc4 100644 +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -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; +-- +1.7.10.4 +