Patchwork dma-mapping: remove unused attrs parameter to dma_common_get_sgtable

login
register
mail settings
Submitter Benjamin Serebrin via iommu
Date Jan. 4, 2019, 2:36 a.m.
Message ID <20190104023625.6960-1-yehs2007@zoho.com>
Download mbox | patch
Permalink /patch/692595/
State New
Headers show

Comments

Benjamin Serebrin via iommu - Jan. 4, 2019, 2:36 a.m.
From: Huaisheng Ye <yehs1@lenovo.com>

dma_common_get_sgtable has parameter attrs which is not used at all.
Remove it.

Signed-off-by: Huaisheng Ye <yehs1@lenovo.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
 drivers/xen/swiotlb-xen.c   | 2 +-
 include/linux/dma-mapping.h | 2 +-
 kernel/dma/mapping.c        | 6 ++----
 3 files changed, 4 insertions(+), 6 deletions(-)

Patch

diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 989cf87..b8cb1da 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -677,7 +677,7 @@  static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
 							   handle, size, attrs);
 	}
 #endif
-	return dma_common_get_sgtable(dev, sgt, cpu_addr, handle, size, attrs);
+	return dma_common_get_sgtable(dev, sgt, cpu_addr, handle, size);
 }
 
 const struct dma_map_ops xen_swiotlb_dma_ops = {
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index ba521d5..f9e7c2a 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -523,7 +523,7 @@  int dma_mmap_attrs(struct device *dev, struct vm_area_struct *vma,
 
 int
 dma_common_get_sgtable(struct device *dev, struct sg_table *sgt, void *cpu_addr,
-		dma_addr_t dma_addr, size_t size, unsigned long attrs);
+		dma_addr_t dma_addr, size_t size);
 
 int dma_get_sgtable_attrs(struct device *dev, struct sg_table *sgt,
 		void *cpu_addr, dma_addr_t dma_addr, size_t size,
diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c
index d7c34d2..0c28b71 100644
--- a/kernel/dma/mapping.c
+++ b/kernel/dma/mapping.c
@@ -203,8 +203,7 @@  void dmam_release_declared_memory(struct device *dev)
  * Create scatter-list for the already allocated DMA buffer.
  */
 int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
-		 void *cpu_addr, dma_addr_t dma_addr, size_t size,
-		 unsigned long attrs)
+		 void *cpu_addr, dma_addr_t dma_addr, size_t size)
 {
 	struct page *page;
 	int ret;
@@ -234,8 +233,7 @@  int dma_get_sgtable_attrs(struct device *dev, struct sg_table *sgt,
 	if (!dma_is_direct(ops) && ops->get_sgtable)
 		return ops->get_sgtable(dev, sgt, cpu_addr, dma_addr, size,
 					attrs);
-	return dma_common_get_sgtable(dev, sgt, cpu_addr, dma_addr, size,
-			attrs);
+	return dma_common_get_sgtable(dev, sgt, cpu_addr, dma_addr, size);
 }
 EXPORT_SYMBOL(dma_get_sgtable_attrs);