Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp129927pxk; Tue, 15 Sep 2020 23:23:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuhfesZd3MKrSua5kbDor9kpLoAHBFaDpOe7RGNV+Ki7qgT0MszrXqcN0FzrgEkifoMtw7 X-Received: by 2002:a17:906:95cf:: with SMTP id n15mr19489066ejy.14.1600237411563; Tue, 15 Sep 2020 23:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600237411; cv=none; d=google.com; s=arc-20160816; b=TSlSLeJku/sGlTk6QM/rNYyYHDaeAUs1XH6ZdPXdlPMvtsNYzx46Iy1CL2VeKT1fq1 LEE6kxFC68WfxORkEAETnw3MMkapRX1zPjc3bSRfkDYhOD2lLlRCmwnmgA15g0RWjTml TrJXn1PlTg7RtLD2adgF8DT2hhyD/ruXj6wUvyDeVKuxMSQ9JrThd5dE4YFCO+/AVPuu FNZ3vQW2GU8A1bTqXryKE9fSUHFiVaj5VUOdegmQ1T76pW/Kh08TVeo328LZgZ8CpP3y uFZbznQDL+HpexpQuN7PVHOgERu46RkQlpss68cJMjn1hVGKapzdyZsmtVYjxiRYLO1K PmfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=m2uI/54b6zhcK5JH2Qkk+DNhltSMOgJF9o6JCspd/6M=; b=ui4Nm8BxTGlR/Wr034/eNUOr26mwOTr39EvDDN5rqauqRFol7YeimjnBH5XmWBcn10 Hoz0lh+muknRgdM3xecyA25oin0hNXUB70PUqB3oVpOx6NTBJC4ISYRxZCuj3RBr8F1J iLdSOjvLySo/+OQTqSFr5Ucg2iN/0yN/VVed1YntlNXnx3YcAbcYmCjsx8nc7Kt6THYJ DqW9dRTEAknptniQNpkm+VkAv+ngdJgOByo+hgd6IscWF3GQWLuGoTFNQgzuUYlzhycC Zl0S7b7A3CyJQ1aTHZoZKMrcdPXPENCdSpS8WTINiBsn3rSxkeVPMO/XZIo2wskqkl7j prUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=wJwNm1s4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h19si11025112ejl.253.2020.09.15.23.23.09; Tue, 15 Sep 2020 23:23:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=wJwNm1s4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726520AbgIPGV4 (ORCPT + 99 others); Wed, 16 Sep 2020 02:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbgIPGVm (ORCPT ); Wed, 16 Sep 2020 02:21:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B88FC06174A; Tue, 15 Sep 2020 23:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=m2uI/54b6zhcK5JH2Qkk+DNhltSMOgJF9o6JCspd/6M=; b=wJwNm1s4NfDg7Hh8T37dQdMDQj brKzrQj2KU/dtPiZ561mn0r/mCAhu2OsYT45jx4aoyR7wQfRVFGO3gz6UhzFmoXx+Q9765Y806Hlu wgCxmVfoCzK1DYkwXqEC2bwIJjb0Rtl7GD31UngOSRnU7fcRTvu+Txb+eUF0ysrXdWnclhwSRH/n2 PiffbrNZTqSz33y69MzqME3aGqWr/+6TEgO/Mx/SZPcYd26EwkTehLs8u26ktT7JJm+FWof5kHaHF jyN4FVUb3G0qo1xXkGaq4lpuqWy8h9qkZWq//9wtpwaxCqp/kksYqX//u4X7GSKDbowpmbT3Ud+tk /5nU+Gzw==; Received: from 089144214092.atnat0023.highway.a1.net ([89.144.214.92] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIQov-0007AD-GS; Wed, 16 Sep 2020 06:21:33 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org, Russell King , Santosh Shilimkar , Greg Kroah-Hartman Cc: Jim Quinlan , Nathan Chancellor , Florian Fainelli , Robin Murphy , Rob Herring , Frank Rowand , Ohad Ben-Cohen , Bjorn Andersson , linux-remoteproc@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/6] ARM/dma-mapping: remove dma_to_virt Date: Wed, 16 Sep 2020 08:14:55 +0200 Message-Id: <20200916061500.1970090-3-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200916061500.1970090-1-hch@lst.de> References: <20200916061500.1970090-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dma_to_virt is entirely unused, remove it. Signed-off-by: Christoph Hellwig --- arch/arm/include/asm/dma-mapping.h | 18 +----------------- arch/arm/mach-omap1/include/mach/memory.h | 4 ---- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 70d95677656044..cf2535fb8891f5 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -24,7 +24,7 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) } /* - * 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. */ @@ -46,17 +46,6 @@ static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) return pfn; } -static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) -{ - if (dev) { - unsigned long pfn = dma_to_pfn(dev, addr); - - return phys_to_virt(__pfn_to_phys(pfn)); - } - - return (void *)__bus_to_virt((unsigned long)addr); -} - static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) { if (dev) @@ -76,11 +65,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-omap1/include/mach/memory.h b/arch/arm/mach-omap1/include/mach/memory.h index 1142560e0078f5..e43697c3297bf2 100644 --- a/arch/arm/mach-omap1/include/mach/memory.h +++ b/arch/arm/mach-omap1/include/mach/memory.h @@ -41,10 +41,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) : \ -- 2.28.0