Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1969069pxk; Mon, 14 Sep 2020 00:41:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoOizFrpeh3qyRVHfbx35P2hUPlXWC9aAODxra/gJYAvXi+Xn5VaaV/ULaFfYheSreIskf X-Received: by 2002:a17:906:2655:: with SMTP id i21mr8820615ejc.511.1600069310363; Mon, 14 Sep 2020 00:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600069310; cv=none; d=google.com; s=arc-20160816; b=qnUzzr6aHWMhiXU28BLN6GaFCKmY8rSkx/tMEMQ+p+ZPUivLh4GGAsCwoSDO28x8kt kuOqBocOp/AfLVuEsY3dFWit//j0/bhHkpeZ4ENYu8VXq5M5D8BYuChaw/LKrYBP22h3 ac7/RUE9iSq4m/mUGAR/C6NzpUFru9j7xfPMkE+Dmv4DUF+Bk+2EQ3i17FEFtat+nn/R o5/XaZoWHw1o0bhXXlfunSh44CUQ2Fi2mvNjXbiEO1b/EZmRowRWw6i6HLgcf21afbIM cVGGzjVzzD601Hr9hDeYjkzoRie8+6UBIZt7BpebTJJaNBtwh5+++ZcmxK1Y6CNnKcym mUfw== 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=wKOi6c/mEGlyQSzXVs+MJgTd22cl9TXOtra0TZCM3BWGERomPv3B8KCjxazzkFMx7o 9jZqdjowpS8BGLbDPVx1Ip4+KIP39tHWUkMj6f73CXn9D57t4k+GQdDDAUCG+Z0La2lZ Tt7o9JVc6VOUO2Gnmhrs/s6DZjjqCygCQeXGdf7/KlE8pPeqk7mZ60vOwkRfW01G9aLH fOlrzvU0ALy6BLjBLVtGdR5xni0VOXe97HPTUkq9rrhdxOE4m260Opi7UEcTHxqrbT6E ayVLESvnkE9zUhHsSErNWcvo6GHYMddRSczEIaeB9F/tifH+2ZJjG1kq3jiBFVEXOIcE pauA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=V9WRKrWM; 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 ec15si6753437ejb.236.2020.09.14.00.41.27; Mon, 14 Sep 2020 00:41:50 -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=V9WRKrWM; 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 S1726093AbgINHkZ (ORCPT + 99 others); Mon, 14 Sep 2020 03:40:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725967AbgINHkY (ORCPT ); Mon, 14 Sep 2020 03:40:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D23A5C06174A; Mon, 14 Sep 2020 00:40:23 -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=V9WRKrWMbS/Pw5aOnQOrYjrdVI ZbvSca4rQofspafvq5fqw7JXd5Alt/v7rsNdTXCZuY41+QJPockPjspbkuctRZgBXGxqJuKWxEn4O Ad/mMESvpm6ndMm7D+bJOh1j44XyiCz5nFHdE4r1X2e3kPuqp3ps2fiQIx4r8dOLOgC0oBa6pcQ3D 3smyizrG3e4oGEmRhzG1djOB0eHWYcjkINxaKZaK7CRXaPGyDu8fvsPRJYtUyo8eImRwq0uofrb0M A6iW3pGZDYLiNQGRBD1uMqEGXXzUZ5kR7YhMUkpxeIbCiL8LywRq72ebHPHto7OwcercW2QuyJWA4 pK0DXiUQ==; 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 1kHj60-0000Ds-AY; Mon, 14 Sep 2020 07:40:16 +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: Mon, 14 Sep 2020 09:33:39 +0200 Message-Id: <20200914073343.1579578-3-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200914073343.1579578-1-hch@lst.de> References: <20200914073343.1579578-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