From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86432C433FE for ; Mon, 2 May 2022 16:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386364AbiEBQrZ (ORCPT ); Mon, 2 May 2022 12:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236980AbiEBQrX (ORCPT ); Mon, 2 May 2022 12:47:23 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D6D7AE7D; Mon, 2 May 2022 09:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=F4i86N8Nb8bYFtZHyMJsf9nGP6no8/uhgRRcYTXlArQ=; b=Uwk8yq3nuhCPprtKTeExiBRxrv r3JOlDDh5F5KsGqszvSx6UN1xdDDCqdzny3+iV+ZZms358MH3NBbhxAvnbHdNIy7+gbC4V+/CFhuZ qlYabR4dRW5ZOUiN0wAHdFY/SnPeF7pB5hKC+fliY0ZwicEmfOjLb6MUEtxHCYq8wcLkZzgSuB+qS +x1IzJt72hc1GyRYqyprcPtPiCjhe5KuBDzN0W6nPoGSP6rbWgL/BVCzKNqeMlShQeqik+u1CNyS/ NPXRRqpPAB+XOZiZMzdm4HhaBwZLbruHjUDVbbTWWGVv/nWDWnlgmCkYfzRYV3xvzO1/uHnWateiU wDFZMy+A==; Received: from [8.34.116.185] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlZ94-001keL-J7; Mon, 02 May 2022 16:43:34 +0000 From: Christoph Hellwig To: Russell King , Arnd Bergmann Cc: Linus Walleij , Andre Przywara , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Greg Kroah-Hartman , Alan Stern , Laurentiu Tudor , Marek Szyprowski , Robin Murphy , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH 04/10] ARM/dma-mapping: remove the unused virt_to_dma helper Date: Mon, 2 May 2022 09:43:24 -0700 Message-Id: <20220502164330.229685-5-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502164330.229685-1-hch@lst.de> References: <20220502164330.229685-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org virt_to_dma was only used by the now removed dmabounce code. Signed-off-by: Christoph Hellwig --- arch/arm/include/asm/dma-direct.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/arm/include/asm/dma-direct.h b/arch/arm/include/asm/dma-direct.h index 77fcb7ee5ec90..6fd52713b5d12 100644 --- a/arch/arm/include/asm/dma-direct.h +++ b/arch/arm/include/asm/dma-direct.h @@ -5,7 +5,7 @@ #include /* - * dma_to_pfn/pfn_to_dma/virt_to_dma are architecture private + * dma_to_pfn/pfn_to_dma are architecture private * functions used internally by the DMA-mapping API to provide DMA * addresses. They must not be used by drivers. */ @@ -25,14 +25,6 @@ static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) return pfn; } -static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) -{ - if (dev) - return pfn_to_dma(dev, virt_to_pfn(addr)); - - return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); -} - static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) { unsigned int offset = paddr & ~PAGE_MASK; -- 2.30.2