IOMMU Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dma/coherent: remove unused dma_get_device_base()
@ 2019-09-17 13:00 Qian Cai
  2019-09-25 20:54 ` Qian Cai
  2019-10-30 18:13 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Qian Cai @ 2019-09-17 13:00 UTC (permalink / raw)
  To: hch; +Cc: vladimir.murzin, linux-kernel, iommu, robin.murphy

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

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dma/coherent: remove unused dma_get_device_base()
  2019-09-17 13:00 [PATCH] dma/coherent: remove unused dma_get_device_base() Qian Cai
@ 2019-09-25 20:54 ` Qian Cai
  2019-10-01  6:43   ` Christoph Hellwig
  2019-10-30 18:13 ` Christoph Hellwig
  1 sibling, 1 reply; 4+ messages in thread
From: Qian Cai @ 2019-09-25 20:54 UTC (permalink / raw)
  To: hch; +Cc: iommu, vladimir.murzin, robin.murphy, linux-kernel

Ping. Please take a look at this trivial patch.

On Tue, 2019-09-17 at 09:00 -0400, Qian Cai wrote:
> 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)
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dma/coherent: remove unused dma_get_device_base()
  2019-09-25 20:54 ` Qian Cai
@ 2019-10-01  6:43   ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2019-10-01  6:43 UTC (permalink / raw)
  To: Qian Cai; +Cc: vladimir.murzin, linux-kernel, iommu, robin.murphy, hch

On Wed, Sep 25, 2019 at 04:54:37PM -0400, Qian Cai wrote:
> Ping. Please take a look at this trivial patch.

No need to rush.  We just had the 5.4 merge window closing.  I'll
queue this up in the dma-mapping for-next tree for 5.5 once I open it.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dma/coherent: remove unused dma_get_device_base()
  2019-09-17 13:00 [PATCH] dma/coherent: remove unused dma_get_device_base() Qian Cai
  2019-09-25 20:54 ` Qian Cai
@ 2019-10-30 18:13 ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2019-10-30 18:13 UTC (permalink / raw)
  To: Qian Cai; +Cc: vladimir.murzin, linux-kernel, iommu, robin.murphy, hch

So it turns out the user now showed up, so I'm skipping this patch.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-17 13:00 [PATCH] dma/coherent: remove unused dma_get_device_base() Qian Cai
2019-09-25 20:54 ` Qian Cai
2019-10-01  6:43   ` Christoph Hellwig
2019-10-30 18:13 ` Christoph Hellwig

IOMMU Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iommu/0 linux-iommu/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iommu linux-iommu/ https://lore.kernel.org/linux-iommu \
		iommu@lists.linux-foundation.org
	public-inbox-index linux-iommu

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linux-foundation.lists.iommu


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git