From patchwork Thu Feb 27 21:17:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 3735861 Return-Path: X-Original-To: patchwork-linux-arm@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 AD6E19F35F for ; Thu, 27 Feb 2014 21:22:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B8C972024D for ; Thu, 27 Feb 2014 21:22:23 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9EF2420255 for ; Thu, 27 Feb 2014 21:22:22 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WJ8NN-0007OO-Iw; Thu, 27 Feb 2014 21:20:18 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WJ8Mv-0004Bd-70; Thu, 27 Feb 2014 21:19:49 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WJ8Ls-00043g-02 for linux-arm-kernel@lists.infradead.org; Thu, 27 Feb 2014 21:18:51 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1RLICd3000718; Thu, 27 Feb 2014 15:18:12 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1RLIC84029930; Thu, 27 Feb 2014 15:18:12 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Thu, 27 Feb 2014 15:18:11 -0600 Received: from ula0393909.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1RLHrff023451; Thu, 27 Feb 2014 15:18:11 -0600 From: Santosh Shilimkar To: Subject: [PATCH v2 2/7] ARM: mm: Remove unsed dma_to_virt() Date: Thu, 27 Feb 2014 16:17:47 -0500 Message-ID: <1393535872-20915-3-git-send-email-santosh.shilimkar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1393535872-20915-1-git-send-email-santosh.shilimkar@ti.com> References: <1393535872-20915-1-git-send-email-santosh.shilimkar@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140227_161844_388737_776668BF X-CRM114-Status: GOOD ( 12.88 ) X-Spam-Score: -3.8 (---) Cc: devicetree@vger.kernel.org, Grygorii Strashko , Russell King , Tony Lindgren , linus.walleij@linaro.org, magnus.damm@gmail.com, Olof Johansson , robh+dt@kernel.org, Santosh Shilimkar , Greg Ungerer , grant.likely@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 From: Grygorii Strashko Remove dma_to_virt() as there are no in-tree users of it. Cc: Russell King Cc: Arnd Bergmann Cc: Olof Johansson Cc: Greg Ungerer Cc: Tony Lindgren Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar Acked-by: Arnd Bergmann Acked-by: Greg Ungerer --- arch/arm/include/asm/dma-mapping.h | 14 +------------- arch/arm/mach-iop13xx/include/mach/memory.h | 11 ----------- arch/arm/mach-ks8695/include/mach/memory.h | 2 -- arch/arm/mach-omap1/include/mach/memory.h | 4 ---- 4 files changed, 1 insertion(+), 30 deletions(-) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 247ed72..e365158 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -51,7 +51,7 @@ static inline int dma_set_mask(struct device *dev, u64 mask) #endif /* - * dma_to_pfn/pfn_to_dma/dma_to_virt/virt_to_dma are architecture private + * dma_to_pfn/pfn_to_dma/virt_to_dma are architecture private * functions used internally by the DMA-mapping API to provide DMA * addresses. They must not be used by drivers. */ @@ -70,13 +70,6 @@ static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) return __bus_to_pfn(addr) + dev->archdata.dma_pfn_offset; } -static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) -{ - if (!dev) - return NULL; - return (void *)__bus_to_virt(__pfn_to_bus(dma_to_pfn(dev, addr))); -} - static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) { if (!dev) @@ -96,11 +89,6 @@ static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) return __arch_dma_to_pfn(dev, addr); } -static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) -{ - return __arch_dma_to_virt(dev, addr); -} - static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) { return __arch_virt_to_dma(dev, addr); diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h index 7c032d0..1223c85 100644 --- a/arch/arm/mach-iop13xx/include/mach/memory.h +++ b/arch/arm/mach-iop13xx/include/mach/memory.h @@ -36,17 +36,6 @@ static inline void __iomem *__lbus_to_virt(dma_addr_t x) #define is_lbus_device(dev) \ (dev && strncmp(dev->bus->name, "platform", 8) == 0) -#define __arch_dma_to_virt(dev, addr) \ - ({ \ - void * __virt; \ - dma_addr_t __dma = addr; \ - if (is_lbus_device(dev) && __is_lbus_dma(__dma)) \ - __virt = __lbus_to_virt(__dma); \ - else \ - __virt = (void *)__phys_to_virt(__dma); \ - __virt; \ - }) - #define __arch_virt_to_dma(dev, addr) \ ({ \ void * __virt = addr; \ diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h index 95e731a..f42477c 100644 --- a/arch/arm/mach-ks8695/include/mach/memory.h +++ b/arch/arm/mach-ks8695/include/mach/memory.h @@ -31,8 +31,6 @@ /* Platform-bus mapping */ extern struct bus_type platform_bus_type; #define is_lbus_device(dev) (dev && dev->bus == &platform_bus_type) -#define __arch_dma_to_virt(dev, x) ({ (void *) (is_lbus_device(dev) ? \ - __phys_to_virt(x) : __bus_to_virt(x)); }) #define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \ (dma_addr_t)__virt_to_phys((unsigned long)x) \ : (dma_addr_t)__virt_to_bus(x); }) diff --git a/arch/arm/mach-omap1/include/mach/memory.h b/arch/arm/mach-omap1/include/mach/memory.h index 3c25305..73f86db 100644 --- a/arch/arm/mach-omap1/include/mach/memory.h +++ b/arch/arm/mach-omap1/include/mach/memory.h @@ -43,10 +43,6 @@ __phys_to_pfn(__dma); \ }) -#define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \ - lbus_to_virt(addr) : \ - __phys_to_virt(addr)); }) - #define __arch_virt_to_dma(dev, addr) ({ unsigned long __addr = (unsigned long)(addr); \ (dma_addr_t) (is_lbus_device(dev) ? \ virt_to_lbus(__addr) : \