From patchwork Wed Sep 30 08:55:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11808499 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E2866CA for ; Wed, 30 Sep 2020 08:59:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67D7020738 for ; Wed, 30 Sep 2020 08:59:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HuykEBRw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Ur7y8KKe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67D7020738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=y3sFE193noR0ppklx07vnZqMKbE0E6IPVDzZHhPtLqE=; b=HuykEBRwvn14zdHf4hIGVjPJz ltugoPezJ5aG8OK8/p8sEwlpf+SKNG8xffniJEf6A6jS5T3k582s6gatCosg0EGNOlsKp0ZGB4yoe ttXAiIyxXPQwEyH+78qBvmPfV2pK/4G+/xkp2nvpIU0VHKcVyfjDuS9uxPqmFqDH/m6I9o110ajFO r9KILC1l95nmjaOpHbnDALrD71IZeAHubH+pEJ+/k5q6NpIoZNC7WM0FaWXcl7ASLlvIQWW1Zw8fq MAS8YGOuyozwpfrTDjf4HFoZIBZOjD6j5ZMQBjKVyxRALgFMYpFNxb/2KRhXYw2WhPCWYstoJzb84 Whs5k1rkw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNXvC-00037j-UM; Wed, 30 Sep 2020 08:57:11 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNXu3-0002iT-V0 for linux-arm-kernel@merlin.infradead.org; Wed, 30 Sep 2020 08:56:00 +0000 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=7wlocwmYpV53gq2F4Jsvj5msvlzhpCuIuqnDE5DhBvk=; b=Ur7y8KKe3cjA7e0c1Ea7QqV9r0 vY6VIBz2QcoRLJe9lf7uVRs2DNjFyCceMqUuaJygZTMw/RtSXGJbPOPzNAzKNsJ1k73ddTiasezFZ d0hr/6pxdWLxOh5G5wi2tXE5PItFpNtOtmzrOATkrGIFj+CSQRKxjTQP+80GSwnqfxLRzI5GIQM7t K+UXTWNBUwSNRxuZWs4qixxTrx0/+tQCjZOLhctLfzeUlYLst+FOknUyqNZ8n7HjsVmTEyGAD7Iid mBbuQ58px4mSIIt4V5A5liJNpP0MRtl24PqVZybE6L48rdfFCi+v4WRhR7c4l8YwN7EX093oOyrEQ MiD31FuA==; Received: from [2001:4bb8:180:7b62:c70:4a89:bc61:4] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNXu2-0003sf-CF; Wed, 30 Sep 2020 08:55:58 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Subject: [PATCH 4/9] dma-contiguous: remove dma_contiguous_set_default Date: Wed, 30 Sep 2020 10:55:43 +0200 Message-Id: <20200930085548.920261-5-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200930085548.920261-1-hch@lst.de> References: <20200930085548.920261-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Sekhar Nori , Russell King , linux-kernel@vger.kernel.org, Robin Murphy , linux-arm-kernel@lists.infradead.org, Marek Szyprowski Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org dma_contiguous_set_default contains a trivial assignment, and has a single caller that is compiled if CONFIG_CMA_DMA is enabled. Signed-off-by: Christoph Hellwig --- include/linux/dma-contiguous.h | 7 ------- kernel/dma/contiguous.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/linux/dma-contiguous.h b/include/linux/dma-contiguous.h index 41ec08d81bc317..f9ce1ee58d4180 100644 --- a/include/linux/dma-contiguous.h +++ b/include/linux/dma-contiguous.h @@ -66,11 +66,6 @@ static inline struct cma *dev_get_cma_area(struct device *dev) return dma_contiguous_default_area; } -static inline void dma_contiguous_set_default(struct cma *cma) -{ - dma_contiguous_default_area = cma; -} - void dma_contiguous_reserve(phys_addr_t addr_limit); int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, @@ -91,8 +86,6 @@ static inline struct cma *dev_get_cma_area(struct device *dev) return NULL; } -static inline void dma_contiguous_set_default(struct cma *cma) { } - static inline void dma_contiguous_reserve(phys_addr_t limit) { } static inline int dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c index 95adcee972e85c..bf05ec2256e149 100644 --- a/kernel/dma/contiguous.c +++ b/kernel/dma/contiguous.c @@ -407,7 +407,7 @@ static int __init rmem_cma_setup(struct reserved_mem *rmem) dma_contiguous_early_fixup(rmem->base, rmem->size); if (default_cma) - dma_contiguous_set_default(cma); + dma_contiguous_default_area = cma; rmem->ops = &rmem_cma_ops; rmem->priv = cma;