Skip to contentSkip to conversation

arch/x86/kernel/pci-dma: Remove useless parameter of arch_dma_alloc_attrs

PATCH Applied Huaisheng Ye 2 participants 2 messages May 25, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/x86/kernel/pci-dma: Remove useless parameter of arch_dma_alloc_attrs

From: Huaisheng Ye <[email protected]>

arch_dma_alloc_attrs has parameter gfp which is not used at all. Remove it.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc Robin Murphy <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Tom Lendacky <[email protected]>
Cc Kate Stewart <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Michal Hocko <[email protected]>
---
 arch/x86/include/asm/dma-mapping.h | 2 +-
 arch/x86/kernel/pci-dma.c          | 2 +-
 include/linux/dma-mapping.h        | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/include/asm/dma-mapping.h +1 -1
index 89ce4bf..ef59747 100644
@@ -33,7 +33,7 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
 int arch_dma_supported(struct device *dev, u64 mask);
 #define arch_dma_supported arch_dma_supported
 
-bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp);
+bool arch_dma_alloc_attrs(struct device **dev);
 #define arch_dma_alloc_attrs arch_dma_alloc_attrs
 
 #endif
arch/x86/kernel/pci-dma.c +1 -1
index 77625b6..94d1a49 100644
@@ -76,7 +76,7 @@ void __init pci_iommu_alloc(void)
 	}
 }
 
-bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp)
+bool arch_dma_alloc_attrs(struct device **dev)
 {
 	if (!*dev)
 		*dev = &x86_dma_fallback_dev;
include/linux/dma-mapping.h +2 -2
index f8ab1c0..c80bb09 100644
@@ -502,7 +502,7 @@ void *dma_common_pages_remap(struct page **pages, size_t size,
 #define dma_get_sgtable(d, t, v, h, s) dma_get_sgtable_attrs(d, t, v, h, s, 0)
 
 #ifndef arch_dma_alloc_attrs
-#define arch_dma_alloc_attrs(dev, flag)	(true)
+#define arch_dma_alloc_attrs(dev)	(true)
 #endif
 
 static inline void *dma_alloc_attrs(struct device *dev, size_t size,
@@ -521,7 +521,7 @@ static inline void *dma_alloc_attrs(struct device *dev, size_t size,
 	/* let the implementation decide on the zone to allocate from: */
 	flag &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM);
 
-	if (!arch_dma_alloc_attrs(&dev, &flag))
+	if (!arch_dma_alloc_attrs(&dev))
 		return NULL;
 	if (!ops->alloc)
 		return NULL;
Signature · 1 line
1.8.3.1