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: 25482 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5EA4520636 for ; Thu, 27 Feb 2014 21:19:04 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id i8sf3951474qcq.8 for ; Thu, 27 Feb 2014 13:19:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=fxdaJbNYoa8DReElme71BG/XePWum26NQjILlhxvsKc=; b=aQfl6YeEzmOT7mH2S6QrAYnUDLLMHkLf1YmnYAuM/NixSz+TZ34zOAEr2F1hbCAFUN FhSA4uy0bZy+LryTIBdFNmrKOw5w0Mktaqn57OAeuWvOobQCMmjNKLL+GX+IEqUT7FMk Rgbfa7knY1iLnrUzLJde9W6PDM4PD+feE+a96+LIgpQKjwUSWZLZuqNkGuajwKzH6529 4stGfLoQkCuLlfa3hPIuoCVx26wv2qFO/83k6qSDiduansFsnSS8d0m91N2RjNnco1s9 Ustdx4rtvThyZNIts+2r6+VChvHU94/3KStXAKQAZTe+unp6aQLql4MZgVAYoNOPiiqS UvVw== X-Gm-Message-State: ALoCoQmdybg/5aEb30wAk65OcPL2gXW+kXW5g5oQ+PerSPbbYmuUka473Aa/EkJoGwa+HuT41pD4 X-Received: by 10.224.20.133 with SMTP id f5mr6204976qab.8.1393535944205; Thu, 27 Feb 2014 13:19:04 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.11 with SMTP id w11ls808678qgw.42.gmail; Thu, 27 Feb 2014 13:19:04 -0800 (PST) X-Received: by 10.52.95.233 with SMTP id dn9mr10445438vdb.3.1393535944123; Thu, 27 Feb 2014 13:19:04 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id u7si1648807vcn.112.2014.02.27.13.19.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Feb 2014 13:19:04 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jx11so4472298veb.31 for ; Thu, 27 Feb 2014 13:19:04 -0800 (PST) X-Received: by 10.221.40.10 with SMTP id to10mr12412483vcb.22.1393535944008; Thu, 27 Feb 2014 13:19:04 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.130.193 with SMTP id u1csp6170vcs; Thu, 27 Feb 2014 13:19:03 -0800 (PST) X-Received: by 10.66.241.73 with SMTP id wg9mr17588565pac.69.1393535935884; Thu, 27 Feb 2014 13:18:55 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi5si5843182pbb.319.2014.02.27.13.18.55; Thu, 27 Feb 2014 13:18:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbaB0VSy (ORCPT + 9 others); Thu, 27 Feb 2014 16:18:54 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:58444 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751586AbaB0VSx (ORCPT ); Thu, 27 Feb 2014 16:18:53 -0500 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: CC: , , , , , , Grygorii Strashko , Russell King , Olof Johansson , Greg Ungerer , Tony Lindgren , Santosh Shilimkar 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 Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: santosh.shilimkar@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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) : \