[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190104023625.6960-1-yehs2007@zoho.com>
Date: Fri, 4 Jan 2019 10:36:25 +0800
From: Huaisheng Ye <yehs2007@...o.com>
To: hch@....de, sstabellini@...nel.org
Cc: konrad.wilk@...cle.com, boris.ostrovsky@...cle.com,
jgross@...e.com, m.szyprowski@...sung.com, robin.murphy@....com,
linux-kernel@...r.kernel.org, chengnt@...ovo.com,
xen-devel@...ts.xenproject.org, iommu@...ts.linux-foundation.org,
Huaisheng Ye <yehs1@...ovo.com>
Subject: [PATCH] dma-mapping: remove unused attrs parameter to dma_common_get_sgtable
From: Huaisheng Ye <yehs1@...ovo.com>
dma_common_get_sgtable has parameter attrs which is not used at all.
Remove it.
Signed-off-by: Huaisheng Ye <yehs1@...ovo.com>
Acked-by: Stefano Stabellini <sstabellini@...nel.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(-)
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);
--
1.8.3.1
Powered by blists - more mailing lists