From patchwork Sat Jun 4 02:23:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Anholt X-Patchwork-Id: 9154431 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 060966074E for ; Sat, 4 Jun 2016 02:23:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D453E28346 for ; Sat, 4 Jun 2016 02:23:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8F4E2833E; Sat, 4 Jun 2016 02:23:38 +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 A9C0E2833E for ; Sat, 4 Jun 2016 02:23:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750747AbcFDCXg (ORCPT ); Fri, 3 Jun 2016 22:23:36 -0400 Received: from anholt.net ([50.246.234.109]:41823 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbcFDCXg (ORCPT ); Fri, 3 Jun 2016 22:23:36 -0400 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id DDC2B2C9C06E; Fri, 3 Jun 2016 19:23:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IZRJkj3Sd0xG; Fri, 3 Jun 2016 19:23:32 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 4A3B22C9C06D; Fri, 3 Jun 2016 19:23:32 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id EB167F00C21; Fri, 3 Jun 2016 19:23:33 -0700 (PDT) From: Eric Anholt To: Vinod Koul Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stephen Warren , Lee Jones , dmaengine@vger.kernel.org, Eric Anholt Subject: [PATCH] dma: bcm2835: Fix compiler warning on arm64. Date: Fri, 3 Jun 2016 19:23:33 -0700 Message-Id: <1465007013-5300-1-git-send-email-eric@anholt.net> X-Mailer: git-send-email 2.8.0.rc3 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The min() macro was complaining about mismatched types. The max len is at most SZ_1G, so we can just put it in an unsigned int. Signed-off-by: Eric Anholt --- Vinod, if you ack it, this one would be nice to be able to merge through the -soc tree, so that when we enable of arm64 builds of this driver we don't introduce a new compiler warning. drivers/dma/bcm2835-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index 6149b27c33ad..1fa11fc067c6 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -393,7 +393,7 @@ 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 max_len = bcm2835_dma_max_frame_length(c); unsigned int i, len; dma_addr_t addr; struct scatterlist *sgent;