From patchwork Mon Mar 14 14:07:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8579201 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 93107C0553 for ; Mon, 14 Mar 2016 14:08:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC91F203C4 for ; Mon, 14 Mar 2016 14:08:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8324D201E4 for ; Mon, 14 Mar 2016 14:07:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1afTA6-0007D0-Mr; Mon, 14 Mar 2016 14:07:58 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1afTA4-0007BI-BE; Mon, 14 Mar 2016 14:07:57 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MMpSB-1akiTS2hpf-008XWB; Mon, 14 Mar 2016 15:07:25 +0100 From: Arnd Bergmann To: "David S. Miller" Subject: [PATCH 1/3] net: mediatek: use dma_addr_t correctly Date: Mon, 14 Mar 2016 15:07:10 +0100 Message-Id: <1457964435-2945038-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:ac03h4tPGnMpk8wS+8lUZmKFj1JmCO2q1zU8OpUSaII7bR3ftXi ldHe8i1pnOtog47QCQ4lnR6wqwgchQdsxX9bgx+OD5iYvyocqPTjQKe+D6csrUfufqcLkpp bD2r3bLzPYbbDymo/cc30vVRuvrpLidvJAa/J4Vha2kfvzAYUg5H7mIyjmvprTN3gFFYINr h67fquYv1Y/88MuL9704A== X-UI-Out-Filterresults: notjunk:1; V01:K0:RKQCA+woAZg=:lXX7clatdCXJpdtynymTnF QW1NbscFHVevhtjcBJDvVpe2xapPsutKdD+SUXjCAoDw8yk7oac9bATIp5IfzR9MfcYyEHoRT D2NNyRY9ehvycqHDWK4S4RSeiOFgZlrU7HK89NltmjS++mxXvk6/39QPX3qthjLb5dVVazP6Z hKBX8MzOPL88Gh3j5sg4FnoPXbJPsWTlTPf0xYL9GV8cDGVjzW3POv/Nq8uZ/JN3XXclik/Os vDa1nYtlQqHIp5+vfUjrlWlAWlytn3rP/ZJqLYvpAjOCgzPu7XAitn/YR9Wb8CuyOSUc71ccr ZKuKgLxQXkN7fM81fAwZZSG+732hlWsWUpIMlIYxcwO+WPRbVSs1W0PJ3bOxGJtUDIyUFbaGc 84H+W2pGY98cmyYINN8C9nktDXIGJQnzONQDqhVvn+D0J3iQBHHhtM35+umLYyom/OJ74w/rx 52nb0KmHhn1RySGxDgy1hjPWOCNTj+PSb+0u++CMYT5vbzcqCvAZ0g+Y0K5VPKIXXN/y3He5w BO3rOFsMXswjnev1TOxY4QzopJAJXMqs8HCZRYx/AMgnJc4Z7RTdOVJc8nUie3PMhquIyi3IB 6lC47IX2uag/M8lyzfUcSBY5xluh5AqdHuzvSZJXOUfcrBPPGgUm4fuSm+3a9WKQO7DOU7Ffp te1elYKH+Pg8wrFbVktatGcLxImbN0w9MbOoQQhfYrWpSeBxAASfpKeAM6zf/rjVW2t4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160314_070756_754205_B335727F X-CRM114-Status: GOOD ( 10.65 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felix Fietkau , Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org, John Crispin MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 ba3afa5d4640..3e42204adfe5 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;