diff mbox series

[v2] PCI: Remove the unused pci wrappers pci_pool_xxx()

Message ID 20211018124110.214-1-caihuoqing@baidu.com
State New
Headers show
Series [v2] PCI: Remove the unused pci wrappers pci_pool_xxx() | expand

Commit Message

Cai Huoqing Oct. 18, 2021, 12:41 p.m. UTC
The wrappers around dma_pool_xxx should go away, so
remove the unused pci wrappers.
Prefer using dma_pool_xxx() instead of the pci wrappers
pci_pool_xxx(), and the use of pci_pool_xxx was already
removed.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
v1->v2: *Revert the implicit inclusion of dma_pool.h

 include/linux/pci.h | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Krzysztof WilczyƄski Oct. 18, 2021, 12:54 p.m. UTC | #1
Hello!

[...]
> v1->v2: *Revert the implicit inclusion of dma_pool.h

I wonder how much of a rabbit hole (or a wild goose chase) would be to
remove this include from linux/pci.h and add it where the users are...

Probably not worth the time.

	Krzysztof
Bjorn Helgaas Oct. 18, 2021, 3:56 p.m. UTC | #2
On Mon, Oct 18, 2021 at 08:41:09PM +0800, Cai Huoqing wrote:
> The wrappers around dma_pool_xxx should go away, so
> remove the unused pci wrappers.
> Prefer using dma_pool_xxx() instead of the pci wrappers
> pci_pool_xxx(), and the use of pci_pool_xxx was already
> removed.
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>

Applied to pci/misc for v5.16, thanks!

I updated the commit log as:

  PCI: Remove unused pci_pool wrappers

  The pci_pool users have been converted to dma_pool.  Remove the unused
  pci_pool wrappers.

> ---
> v1->v2: *Revert the implicit inclusion of dma_pool.h
> 
>  include/linux/pci.h | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 94c75f3a4a19..74529d0388de 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1500,19 +1500,8 @@ int pci_set_vga_state(struct pci_dev *pdev, bool decode,
>  #define PCI_IRQ_ALL_TYPES \
>  	(PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX)
>  
> -/* kmem_cache style wrapper around pci_alloc_consistent() */
> -
>  #include <linux/dmapool.h>
>  
> -#define	pci_pool dma_pool
> -#define pci_pool_create(name, pdev, size, align, allocation) \
> -		dma_pool_create(name, &pdev->dev, size, align, allocation)
> -#define	pci_pool_destroy(pool) dma_pool_destroy(pool)
> -#define	pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
> -#define	pci_pool_zalloc(pool, flags, handle) \
> -		dma_pool_zalloc(pool, flags, handle)
> -#define	pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
> -
>  struct msix_entry {
>  	u32	vector;	/* Kernel uses to write allocated vector */
>  	u16	entry;	/* Driver uses to specify entry, OS writes */
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 94c75f3a4a19..74529d0388de 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1500,19 +1500,8 @@  int pci_set_vga_state(struct pci_dev *pdev, bool decode,
 #define PCI_IRQ_ALL_TYPES \
 	(PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX)
 
-/* kmem_cache style wrapper around pci_alloc_consistent() */
-
 #include <linux/dmapool.h>
 
-#define	pci_pool dma_pool
-#define pci_pool_create(name, pdev, size, align, allocation) \
-		dma_pool_create(name, &pdev->dev, size, align, allocation)
-#define	pci_pool_destroy(pool) dma_pool_destroy(pool)
-#define	pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
-#define	pci_pool_zalloc(pool, flags, handle) \
-		dma_pool_zalloc(pool, flags, handle)
-#define	pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
-
 struct msix_entry {
 	u32	vector;	/* Kernel uses to write allocated vector */
 	u16	entry;	/* Driver uses to specify entry, OS writes */