linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qian Cai <cai@lca.pw>
To: hch@lst.de
Cc: m.szyprowski@samsung.com, robin.murphy@arm.com,
	vladimir.murzin@arm.com, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, Qian Cai <cai@lca.pw>
Subject: [PATCH] dma/coherent: remove unused dma_get_device_base()
Date: Tue, 17 Sep 2019 09:00:42 -0400	[thread overview]
Message-ID: <1568725242-2433-1-git-send-email-cai@lca.pw> (raw)

dma_get_device_base() was first introduced in the commit c41f9ea998f3
("drivers: dma-coherent: Account dma_pfn_offset when used with device
tree"). Later, it was removed by the commit 43fc509c3efb ("dma-coherent:
introduce interface for default DMA pool")

Found by the -Wunused-function compilation warning.

Signed-off-by: Qian Cai <cai@lca.pw>
---
 kernel/dma/coherent.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/kernel/dma/coherent.c b/kernel/dma/coherent.c
index 29fd6590dc1e..909b38e1c29b 100644
--- a/kernel/dma/coherent.c
+++ b/kernel/dma/coherent.c
@@ -28,15 +28,6 @@ static inline struct dma_coherent_mem *dev_get_coherent_memory(struct device *de
 	return NULL;
 }
 
-static inline dma_addr_t dma_get_device_base(struct device *dev,
-					     struct dma_coherent_mem * mem)
-{
-	if (mem->use_dev_dma_pfn_offset)
-		return (mem->pfn_base - dev->dma_pfn_offset) << PAGE_SHIFT;
-	else
-		return mem->device_base;
-}
-
 static int dma_init_coherent_memory(phys_addr_t phys_addr,
 		dma_addr_t device_addr, size_t size,
 		struct dma_coherent_mem **mem)
-- 
1.8.3.1


             reply	other threads:[~2019-09-17 13:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17 13:00 Qian Cai [this message]
2019-09-25 20:54 ` [PATCH] dma/coherent: remove unused dma_get_device_base() Qian Cai
2019-10-01  6:43   ` Christoph Hellwig
2019-10-30 18:13 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1568725242-2433-1-git-send-email-cai@lca.pw \
    --to=cai@lca.pw \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=vladimir.murzin@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).