From patchwork Mon Feb 24 20:53:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 25216 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 307142066C for ; Mon, 24 Feb 2014 20:57:52 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id jw12sf9434191veb.7 for ; Mon, 24 Feb 2014 12:57:52 -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:subject:date:message-id :in-reply-to:references:mime-version:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=ONi1AcEf+XtIS+bGu4jDEJsLsu3kR3HupyCC1Bjr/4E=; b=lGtZkGvMCMj0b1VudsVtz52/vVdJleNBV4fkWWjhtt0z+I/xmPG8na82QRK+pkF5FQ /Rejg7fZJ/QTTjTJ+QEcOTz1z3NEIjbS1myl3wsC7JezlzOti8rpYiaaN6IP3D2PQ6rq VnWpZNgPmI2nMSWoyx+EDcICC8/OI8j1iSTmxPr6mL8iqJpOAJykf6vxIvg55nOf50UR RYTcZ75JTJd+7maUBpgJAYR9K6U8/q70dzEdBC4ehKGRbIdescfg6fos4MjcO3q9FYjb 1AcyG/osbOkS7fr6jRedTUkO3Ji5AlfSike4YF8BlTFSe0rhJ0n7sy10YiaS6hI683yJ zeYw== X-Gm-Message-State: ALoCoQlbCmwl0Tnrw06oSD1HVAvZTrsBPTfHPdiW2KGNSUgncTTk870ZIldu/QXUwjmMGhtvy3au X-Received: by 10.236.86.77 with SMTP id v53mr384775yhe.41.1393275471968; Mon, 24 Feb 2014 12:57:51 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.203 with SMTP id t69ls2112896qgd.87.gmail; Mon, 24 Feb 2014 12:57:51 -0800 (PST) X-Received: by 10.53.8.166 with SMTP id dl6mr1557074vdd.60.1393275471800; Mon, 24 Feb 2014 12:57:51 -0800 (PST) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id uw4si6198932vdc.27.2014.02.24.12.57.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 12:57:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.174 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.174; Received: by mail-ve0-f174.google.com with SMTP id oy12so1654124veb.5 for ; Mon, 24 Feb 2014 12:57:51 -0800 (PST) X-Received: by 10.52.23.68 with SMTP id k4mr11902168vdf.24.1393275471667; Mon, 24 Feb 2014 12:57:51 -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.174.196 with SMTP id u4csp88464vcz; Mon, 24 Feb 2014 12:57:51 -0800 (PST) X-Received: by 10.180.12.115 with SMTP id x19mr16278444wib.19.1393275470787; Mon, 24 Feb 2014 12:57:50 -0800 (PST) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id ni7si6636841wic.74.2014.02.24.12.57.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2014 12:57:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WI2ZS-0005f7-W1; Mon, 24 Feb 2014 20:56:15 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WI2ZC-00030Z-Sm; Mon, 24 Feb 2014 20:55:58 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WI2Yx-0002xj-UL for linux-arm-kernel@lists.infradead.org; Mon, 24 Feb 2014 20:55:46 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1OKt6Tx023715; Mon, 24 Feb 2014 14:55:06 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1OKt5VE015001; Mon, 24 Feb 2014 14:55:06 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Mon, 24 Feb 2014 14:54:25 -0600 Received: from ula0393909.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1OKrvD8007081; Mon, 24 Feb 2014 14:54:25 -0600 From: Santosh Shilimkar To: Subject: [PATCH 2/4] ARM: mm: Remove unsed dma_to_virt() Date: Mon, 24 Feb 2014 15:53:53 -0500 Message-ID: <1393275235-1087-3-git-send-email-santosh.shilimkar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1393275235-1087-1-git-send-email-santosh.shilimkar@ti.com> References: <1393275235-1087-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-20140224_155544_109168_57AEEE4C X-CRM114-Status: GOOD ( 12.84 ) X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.94.94.40 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Grygorii Strashko , Russell King , Arnd Bergmann , Tony Lindgren , Santosh Shilimkar , Greg Ungerer , Olof Johansson 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+patch=linaro.org@lists.infradead.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.174 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 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) : \