From patchwork Mon Jul 11 21:46:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9224285 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 22CD160572 for ; Mon, 11 Jul 2016 21:43:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14A6127D76 for ; Mon, 11 Jul 2016 21:43:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0942B27E3E; Mon, 11 Jul 2016 21:43:43 +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 7F31A27D76 for ; Mon, 11 Jul 2016 21:43:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752914AbcGKVnm (ORCPT ); Mon, 11 Jul 2016 17:43:42 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:65424 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484AbcGKVnl (ORCPT ); Mon, 11 Jul 2016 17:43:41 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MSmwb-1bmPEM46h3-00Rm1N; Mon, 11 Jul 2016 23:43:08 +0200 From: Arnd Bergmann To: Vinod Koul Cc: Arnd Bergmann , Dan Williams , Michal Simek , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , Kedareswara rao Appana , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: zynqmp: avoid cast warning Date: Mon, 11 Jul 2016 23:46:09 +0200 Message-Id: <20160711214642.2610193-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:g7UuWxcXgzDWt9n7Mge7eoGDah/m/wNs/N8zv/z1WgZ/hwWSdzY LT2hrM25iy++MDfmQTo9o2Y68tBnx7OW5kAvR6XbOoObVZoozrZbJ1wkUw6ZXcTD2bK2n6j Qbw//wUUJd/qIP80zzsPlrMCIxrKZ4KR4GPP5S03/18eIyYmIYeckkNeg/9MDPD5QEVIt3C uAWD+T+uHDeD2bvaqRPKA== X-UI-Out-Filterresults: notjunk:1; V01:K0:hh4+D3BEHoQ=:x2+iITnGXew3MLQkyGljCU G/f9yJxLOcjn1jipq4A0L9JJztAY2dceK61BUIDe0xdxyJ4VHa2W057nTWalhCxg7KItlho8X hwPZFnBI8YJ/CehtA0NqIFgitsGl7JAHb/tZqLyz2hXs288IvHeqX2L0hENJZkTWZybzsXyoA hWbRZlArHqNImsUcuDrhWFC80D+BDpM/efYYGwQQxYhkLRHbmYEKWBT/feLAg5bF0UCkZ04Cg pYNMrD/9XhGM4ECOyAXoIJEQBzD+cHZfB/lTLdyLv9dWUsRca+wYw5Jhy1t+sWChY5unXKUtL yh62XkW5QgjLRSqBemCza1hwMihdXgLoXeheUb5nYxPOpPuA4TyV6GspT5mvKXoI2zY6vq8dl FofLSeRmLJxAxsExApeS3hcQUZiJTdyu/YdYXnRpt5ri4D6arcJMPA3R9PUyBsDhuSYk8yMPv pmnoTwnsEiaCJ3t6UnZO1buf4dM0mNNEKfhiJuj36NZ1Ki0kUoHk8+NPG31IRWzpOT6xem1PM GCycG6ImMW6mx7n3IljeNsKdfSNnGawXiBhyMGUVvz3xjR3lq9Ekqfobq0maerZbjsK0+k+7e fjNr1v/v6PwEo/lby02IhLmx8jfgYItQ2tiF9r+iHOHKbX3gd+Qby1CARJnX9i6auYZ5/3o50 HM/GQi1X2YkoHMCmKZmqApGI9hw1iZWHhV3EbHhyOnHya+qDXrFIVkaAtyR6+T7lF0GY= Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The newly added zynqmp_dma driver produces a warning on 32-bit architectures when dma_addr_t is 64-bit wide: drivers/dma/xilinx/zynqmp_dma.c: In function 'zynqmp_dma_config_sg_ll_desc': drivers/dma/xilinx/zynqmp_dma.c:321:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] ((dma_addr_t)sdesc - (dma_addr_t)chan->desc_pool_v); ^ drivers/dma/xilinx/zynqmp_dma.c:321:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] ((dma_addr_t)sdesc - (dma_addr_t)chan->desc_pool_v); This changes the cast to the more appropriate uintptr_t. Signed-off-by: Arnd Bergmann --- drivers/dma/xilinx/zynqmp_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index 59bc1f730a48..f777a5bc0db8 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -318,7 +318,7 @@ static void zynqmp_dma_config_sg_ll_desc(struct zynqmp_dma_chan *chan, if (prev) { dma_addr_t addr = chan->desc_pool_p + - ((dma_addr_t)sdesc - (dma_addr_t)chan->desc_pool_v); + ((uintptr_t)sdesc - (uintptr_t)chan->desc_pool_v); ddesc = prev + 1; prev->nxtdscraddr = addr; ddesc->nxtdscraddr = addr + ZYNQMP_DMA_DESC_SIZE(chan);