From patchwork Wed Dec 11 23:51:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 3329121 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D08779F37C for ; Wed, 11 Dec 2013 23:51:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2EAF20800 for ; Wed, 11 Dec 2013 23:51:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 37AEF207EF for ; Wed, 11 Dec 2013 23:51:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751577Ab3LKXut (ORCPT ); Wed, 11 Dec 2013 18:50:49 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:58956 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751406Ab3LKXur (ORCPT ); Wed, 11 Dec 2013 18:50:47 -0500 Received: by mail-pd0-f173.google.com with SMTP id p10so10464838pdj.32 for ; Wed, 11 Dec 2013 15:50:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=j9S2PtJK6FOcMUtlYIeftoRbUE+3UaORlblqJL+E0C4=; b=V1YbTb0h68PKXYBqHGqAQClc5lNxYlU61s4yjRztA3vMLXQNCHPZBSr+Yn2V6xMzdL A1wA9M6DHOVnSYYIT9hFNlyeg1CfxKzkWcVXF48+U/+Xl++NnV8mCKMr04EVzqbcRvMj Mu0s3eso/Ru0/A72DNWNpuOQeManvZxKwAHxyqHYzLQ7SaSnzlHyrspMfLJC4U7O5G5c RyKRcNmE/j5j8tIdLJpWuoK0prsmqUscadt6kysqAVqgWV7W4YhGfLXVzi+WqrcRMPCm hyYusa7p+fYD9iWDPCP4f3DlH9c/fqvoSeSyrWRPwN3RoxPFp8Uzhv8vf42c0xhZ11TL F32A== X-Gm-Message-State: ALoCoQnIXvw/Vx0gi6C230ayVcbvM6ekzeICdW8Jj5eu5P6ezQfKEPCJAX2sReeoqddkEsmaB9mw X-Received: by 10.68.91.3 with SMTP id ca3mr6024783pbb.20.1386805846387; Wed, 11 Dec 2013 15:50:46 -0800 (PST) Received: from brutus.lixom.net (173-13-129-225-sfba.hfc.comcastbusiness.net. [173.13.129.225]) by mx.google.com with ESMTPSA id ja5sm35455215pbc.14.2013.12.11.15.50.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Dec 2013 15:50:45 -0800 (PST) From: Olof Johansson To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Olof Johansson Subject: [PATCH 1/2] net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup Date: Wed, 11 Dec 2013 15:51:20 -0800 Message-Id: <1386805882-25360-1-git-send-email-olof@lixom.net> X-Mailer: git-send-email 1.7.10.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Silences the below warnings when building with ARM_LPAE enabled, which gives longer dma_addr_t by default: drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_desc_pool_create': drivers/net/ethernet/ti/davinci_cpdma.c:182:3: warning: passing argument 3 of 'dma_alloc_attrs' from incompatible pointer type [enabled by default] drivers/net/ethernet/ti/davinci_cpdma.c: In function 'desc_phys': drivers/net/ethernet/ti/davinci_cpdma.c:222:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/net/ethernet/ti/davinci_cpdma.c:223:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Olof Johansson --- drivers/net/ethernet/ti/davinci_cpdma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index 90a7946..b041a87 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c @@ -81,7 +81,7 @@ struct cpdma_desc { }; struct cpdma_desc_pool { - u32 phys; + phys_addr_t phys; u32 hw_addr; void __iomem *iomap; /* ioremap map */ void *cpumap; /* dma_alloc map */ @@ -219,8 +219,7 @@ static inline dma_addr_t desc_phys(struct cpdma_desc_pool *pool, { if (!desc) return 0; - return pool->hw_addr + (__force dma_addr_t)desc - - (__force dma_addr_t)pool->iomap; + return pool->hw_addr + (__force long)desc - (__force long)pool->iomap; } static inline struct cpdma_desc __iomem *