linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huaisheng Ye <yehs2007@zoho.com>
To: hch@lst.de, sstabellini@kernel.org
Cc: konrad.wilk@oracle.com, boris.ostrovsky@oracle.com,
	jgross@suse.com, m.szyprowski@samsung.com, robin.murphy@arm.com,
	linux-kernel@vger.kernel.org, chengnt@lenovo.com,
	xen-devel@lists.xenproject.org, iommu@lists.linux-foundation.org,
	Huaisheng Ye <yehs1@lenovo.com>
Subject: [PATCH] dma-mapping: remove unused attrs parameter to dma_common_get_sgtable
Date: Fri,  4 Jan 2019 10:36:25 +0800	[thread overview]
Message-ID: <20190104023625.6960-1-yehs2007@zoho.com> (raw)

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(-)

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



             reply	other threads:[~2019-01-04  2:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04  2:36 Huaisheng Ye [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-01-04  1:45 [PATCH] dma-mapping: remove unused attrs parameter to dma_common_get_sgtable Huaisheng HS1 Ye
2019-01-04  7:26 ` hch
2019-01-03  8:29 Huaisheng Ye
2019-01-03 17:54 ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190104023625.6960-1-yehs2007@zoho.com \
    --to=yehs2007@zoho.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=chengnt@lenovo.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yehs1@lenovo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).