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: 102064 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp375340qgy; Thu, 30 Jun 2016 05:47:46 -0700 (PDT) X-Received: by 10.98.70.11 with SMTP id t11mr21155834pfa.16.1467290865170; Thu, 30 Jun 2016 05:47:45 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id w85si4445039pfi.6.2016.06.30.05.47.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 05:47:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIbMf-0005QU-RT; Thu, 30 Jun 2016 12:46:41 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIbMZ-0005LX-V3; Thu, 30 Jun 2016 12:46:36 +0000 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 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:vbuzRwykv2I=:rJ3JFHPVLADcgtYnSvzDhM gzBKoWtpE+KPSaDuXOT68PR6kzzMUVMJkwem+6hbqfvUet0fOtX/paY6OerYspFKdrfGkTQp1 37j/eMNfzSYXEcO+gH0KaTLEGekcpYAH/qKCYfIQvWNZjyWdp7WNloLa0ztW8qt+j5Was71T/ i+4eOWZ5nVjcdzxxl7aCa402RmRL3PvIFnRtrTOUeR7nulaWftUXs5xa1fDogHFa5QnCuCTQ4 T1hshnUKlYZccRQOlpzeO4lhuCIt6kgLZeJ0LqXPSEMK6xz8W5yR6zwPAawUEH5Y2FLgYh0nq VVUeT/m6wjq5uZoEvqvcNjKMU/aqT+dz1/gZhl3Ik6ToeMu7exvLpOZ+g09Z3bnYCwAHr2fFP 1eddgnJVplGAt0HwmN9zE6bNKxWs8VVJ4lYI1KdQ9xX0u6lMx1FJnDhXdDhEfdsdAilVsty5y hF3PT8s2VJ324g0dBizjrBYAvbxKWqj2X/3DV6HTioAhhbdL0ZnN1LSfnIQmZgN6YHqIhinHg UJ9Z01WvG7tK500O/s+pmbbIu0HeYBQGvjRMuXH148cZrVPvwbCHHSUFVVT8WpYxXFcZC6Hhl 08WMaFBpRArAXtExysuJfGoJOT3LDriP+Q+Z8vE1dae7L8s4e5hqSbsZmc0nec7dt7uVhpchj OPPKfCNTL0N7Q7+9lKG9ODuW8U+LVFfor8hDENXzIieMpbVdKzub8ROE5bmRkfay8D38= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160630_054636_337394_5BA42180 X-CRM114-Status: GOOD ( 10.46 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.135 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.135 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Stephen Warren , Lee Jones , linux-kernel@vger.kernel.org, Eric Anholt , linux-rpi-kernel@lists.infradead.org, dmaengine@vger.kernel.org, Martin Sperl , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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;