Linux IOMMU Development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
To: Konrad Rzeszutek Wilk
	<konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Boris Ostrovsky
	<boris.ostrovsky-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Juergen Gross <jgross-IBi9RG/b67k@public.gmane.org>,
	Stefano Stabellini
	<sstabellini-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: [PATCH 1/4] swiotlb-xen: make instances match their method names
Date: Thu, 11 Apr 2019 09:19:57 +0200	[thread overview]
Message-ID: <20190411072000.4306-2-hch@lst.de> (raw)
In-Reply-To: <20190411072000.4306-1-hch-jcswGhMUV9g@public.gmane.org>

Just drop two pointless _attrs prefixes to make the code a little
more grep-able.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 drivers/xen/swiotlb-xen.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 877baf2a94f4..d4bc3aabd44d 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -504,9 +504,8 @@ xen_swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
  * concerning calls here are the same as for swiotlb_unmap_page() above.
  */
 static void
-xen_swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
-			   int nelems, enum dma_data_direction dir,
-			   unsigned long attrs)
+xen_swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sgl, int nelems,
+		enum dma_data_direction dir, unsigned long attrs)
 {
 	struct scatterlist *sg;
 	int i;
@@ -535,9 +534,8 @@ xen_swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
  * same here.
  */
 static int
-xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
-			 int nelems, enum dma_data_direction dir,
-			 unsigned long attrs)
+xen_swiotlb_map_sg(struct device *hwdev, struct scatterlist *sgl, int nelems,
+		enum dma_data_direction dir, unsigned long attrs)
 {
 	struct scatterlist *sg;
 	int i;
@@ -562,8 +560,7 @@ xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
 				/* Don't panic here, we expect map_sg users
 				   to do proper error handling. */
 				attrs |= DMA_ATTR_SKIP_CPU_SYNC;
-				xen_swiotlb_unmap_sg_attrs(hwdev, sgl, i, dir,
-							   attrs);
+				xen_swiotlb_unmap_sg(hwdev, sgl, i, dir, attrs);
 				sg_dma_len(sgl) = 0;
 				return 0;
 			}
@@ -690,8 +687,8 @@ const struct dma_map_ops xen_swiotlb_dma_ops = {
 	.sync_single_for_device = xen_swiotlb_sync_single_for_device,
 	.sync_sg_for_cpu = xen_swiotlb_sync_sg_for_cpu,
 	.sync_sg_for_device = xen_swiotlb_sync_sg_for_device,
-	.map_sg = xen_swiotlb_map_sg_attrs,
-	.unmap_sg = xen_swiotlb_unmap_sg_attrs,
+	.map_sg = xen_swiotlb_map_sg,
+	.unmap_sg = xen_swiotlb_unmap_sg,
 	.map_page = xen_swiotlb_map_page,
 	.unmap_page = xen_swiotlb_unmap_page,
 	.dma_supported = xen_swiotlb_dma_supported,
-- 
2.20.1

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org, iommu@lists.linux-foundation.org
Subject: [PATCH 1/4] swiotlb-xen: make instances match their method names
Date: Thu, 11 Apr 2019 09:19:57 +0200	[thread overview]
Message-ID: <20190411072000.4306-2-hch@lst.de> (raw)
Message-ID: <20190411071957.fZYIBYAdGWPkg69AEHLBw_k2PWodqzQzuZDcWAMFhvs@z> (raw)
In-Reply-To: <20190411072000.4306-1-hch@lst.de>

Just drop two pointless _attrs prefixes to make the code a little
more grep-able.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/xen/swiotlb-xen.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 877baf2a94f4..d4bc3aabd44d 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -504,9 +504,8 @@ xen_swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
  * concerning calls here are the same as for swiotlb_unmap_page() above.
  */
 static void
-xen_swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
-			   int nelems, enum dma_data_direction dir,
-			   unsigned long attrs)
+xen_swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sgl, int nelems,
+		enum dma_data_direction dir, unsigned long attrs)
 {
 	struct scatterlist *sg;
 	int i;
@@ -535,9 +534,8 @@ xen_swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
  * same here.
  */
 static int
-xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
-			 int nelems, enum dma_data_direction dir,
-			 unsigned long attrs)
+xen_swiotlb_map_sg(struct device *hwdev, struct scatterlist *sgl, int nelems,
+		enum dma_data_direction dir, unsigned long attrs)
 {
 	struct scatterlist *sg;
 	int i;
@@ -562,8 +560,7 @@ xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
 				/* Don't panic here, we expect map_sg users
 				   to do proper error handling. */
 				attrs |= DMA_ATTR_SKIP_CPU_SYNC;
-				xen_swiotlb_unmap_sg_attrs(hwdev, sgl, i, dir,
-							   attrs);
+				xen_swiotlb_unmap_sg(hwdev, sgl, i, dir, attrs);
 				sg_dma_len(sgl) = 0;
 				return 0;
 			}
@@ -690,8 +687,8 @@ const struct dma_map_ops xen_swiotlb_dma_ops = {
 	.sync_single_for_device = xen_swiotlb_sync_single_for_device,
 	.sync_sg_for_cpu = xen_swiotlb_sync_sg_for_cpu,
 	.sync_sg_for_device = xen_swiotlb_sync_sg_for_device,
-	.map_sg = xen_swiotlb_map_sg_attrs,
-	.unmap_sg = xen_swiotlb_unmap_sg_attrs,
+	.map_sg = xen_swiotlb_map_sg,
+	.unmap_sg = xen_swiotlb_unmap_sg,
 	.map_page = xen_swiotlb_map_page,
 	.unmap_page = xen_swiotlb_unmap_page,
 	.dma_supported = xen_swiotlb_dma_supported,
-- 
2.20.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2019-04-11  7:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11  7:19 a few xen swiotlb cleanups Christoph Hellwig
2019-04-11  7:19 ` Christoph Hellwig
     [not found] ` <20190411072000.4306-1-hch-jcswGhMUV9g@public.gmane.org>
2019-04-11  7:19   ` Christoph Hellwig [this message]
2019-04-11  7:19     ` [PATCH 1/4] swiotlb-xen: make instances match their method names Christoph Hellwig
     [not found]     ` <20190411072000.4306-2-hch-jcswGhMUV9g@public.gmane.org>
2019-04-15 22:55       ` Stefano Stabellini
2019-04-15 22:55         ` Stefano Stabellini
2019-04-11  7:19   ` [PATCH 2/4] swiotlb-xen: use ->map_page to implement ->map_sg Christoph Hellwig
2019-04-11  7:19     ` Christoph Hellwig
     [not found]     ` <20190411072000.4306-3-hch-jcswGhMUV9g@public.gmane.org>
2019-04-15 22:55       ` Stefano Stabellini
2019-04-15 22:55         ` Stefano Stabellini
2019-04-11  7:19   ` [PATCH 3/4] swiotlb-xen: simplify the DMA sync method implementations Christoph Hellwig
2019-04-11  7:19     ` Christoph Hellwig
     [not found]     ` <20190411072000.4306-4-hch-jcswGhMUV9g@public.gmane.org>
2019-04-15 22:55       ` Stefano Stabellini
2019-04-15 22:55         ` Stefano Stabellini
2019-04-11  7:20   ` [PATCH 4/4] swiotlb-xen: ensure we have a single callsite for xen_dma_map_page Christoph Hellwig
2019-04-11  7:20     ` Christoph Hellwig
     [not found]     ` <20190411072000.4306-5-hch-jcswGhMUV9g@public.gmane.org>
2019-04-15 22:56       ` Stefano Stabellini
2019-04-15 22:56         ` Stefano Stabellini
2019-04-25 18:55   ` a few xen swiotlb cleanups Konrad Rzeszutek Wilk
2019-04-25 18:55     ` Konrad Rzeszutek Wilk

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=20190411072000.4306-2-hch@lst.de \
    --to=hch-jcswghmuv9g@public.gmane.org \
    --cc=boris.ostrovsky-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jgross-IBi9RG/b67k@public.gmane.org \
    --cc=konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=sstabellini-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org \
    /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