From patchwork Thu Jun 30 12:47: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: 9207439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 587286075A for ; Thu, 30 Jun 2016 12:53:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A03D2840E for ; Thu, 30 Jun 2016 12:53:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EA18285E6; Thu, 30 Jun 2016 12:53:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA2302840E for ; Thu, 30 Jun 2016 12:53:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752028AbcF3Mx5 (ORCPT ); Thu, 30 Jun 2016 08:53:57 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:64299 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751432AbcF3Mx4 (ORCPT ); Thu, 30 Jun 2016 08:53:56 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0LfsQF-1bhF0S3j8l-00pd5N; Thu, 30 Jun 2016 14:46:04 +0200 From: Arnd Bergmann To: Vinod Koul Cc: Arnd Bergmann , Stephen Warren , Lee Jones , Eric Anholt , Martin Sperl , dmaengine@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: bcm2835: fix 64-bit warning Date: Thu, 30 Jun 2016 14:47:10 +0200 Message-Id: <20160630124845.184259-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:Ez0CgGbuhVfgsw2bYtkoJtwmULgVp/AlLv7O8bRpsLULSen2lwL 2XHkOOYptdnrqo4FAR/p/hdsuvEkNT2RrrTQPhypJMD3Zm3COBCw8u9gWet4odhsrx1w6P0 jePiDvuZIlUnYctCV8u+iU/b5EjicjQILPMtWJvSu7Tp4KKEccJ9W77e8CQ7/CEoA4GNx6A /CjlZ4k1U5yzrESm4Ym3Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:RwJHMzE7alY=:zMOl4d8ywa5y3z3edsYMZ8 oePE+RcVmoY9mxIGkWzRZs09QAYldfXBZzeAQdRbH1VZ5cqvk+jctJB0irO4n8pWoBa2z1piJ OROKUlOG0g9uyG/NtLj2Ra3MzMmcCcZ+PYixcp7A8TS8k50RyuJ/9XFxuCGZLY0l0UXkGVoGI 0YcFnx3iotQUh1+5cNwtbmHb8z48884TQmYt4x9KCI4JTMComXC0UDlMuAIruUzscT+u13LtS 5ZaxpwiHnR0wGFIkwOFquIy7szYt2kr3PEV/8Tq1O/q2h7uaEJWUTkRh0qG9Tm8GEKSrwP6rQ ECXfKqCfItFGqpVnlmNoWs8Z/xi+6+Oes4TIGawAn8i8K3xjswaZFwz7Z5JGaCHnyzoYZRQb0 C9KWTX+B+aT7fUO8PbEYX9USdt4oBtQbfd0AcV6WE8kz5npiFmkCQQZDRYVB0CdrueNAruIeG 1gs/Y1wd+WIXmN7tlKGMEuLzgtkhao1x1g2ej0+ACrpCGTfDv+7fWXMX3FD2dKenTr4pwv2UN kUE+8wWlVyayMAiz5TsVUljNBT+JTNW6nGbWKcGy6vFxVJ+wa/FKEJlRCXgc+KDebHPlJup7j hzpjUm5CpfJagVEn+HUF7Rr/BoZmKhWF5wiMdNWft7tlYmXKuMqxO3SbYo8f4Wide6MCyAJ2y CQLchq2s+QqfC6fvE/QBeVlk0vd3pAi7pV96jpdMqqqD5SVyvKrSBKrH69g14hwVnHqs= Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When building this driver on arm64, we get a harmless type mismatch warning: drivers/dma/bcm2835-dma.c: In function 'bcm2835_dma_fill_cb_chain_with_sg': include/linux/kernel.h:743:17: warning: comparison of distinct pointer types lacks a cast (void) (&_min1 == &_min2); \ ^ drivers/dma/bcm2835-dma.c:409:21: note: in expansion of macro 'min' cb->cb->length = min(len, max_len); This changes the type of the 'len' variable to size_t, which avoids the problem. Signed-off-by: Arnd Bergmann Fixes: 388cc7a281c0 ("dmaengine: bcm2835: add slave_sg support to bcm2835-dma") --- drivers/dma/bcm2835-dma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index 9ecb94238aaf..e18dc596cf24 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -393,11 +393,12 @@ static void bcm2835_dma_fill_cb_chain_with_sg( unsigned int sg_len) { struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); - size_t max_len = bcm2835_dma_max_frame_length(c); - unsigned int i, len; + size_t len, max_len; + unsigned int i; dma_addr_t addr; struct scatterlist *sgent; + max_len = bcm2835_dma_max_frame_length(c); for_each_sg(sgl, sgent, sg_len, i) { for (addr = sg_dma_address(sgent), len = sg_dma_len(sgent); len > 0;