All of lore.kernel.org
 help / color / mirror / Atom feed
From: Desnes Nunes <desnesn@redhat.com>
To: iommu@lists.linux.dev, linux-scsi@vger.kernel.org,
	storagedev@microchip.com, linux-kernel@vger.kernel.org
Cc: hch@lst.de, martin.petersen@oracle.com, don.brace@microchip.com,
	m.szyprowski@samsung.com, robin.murphy@arm.com,
	jejb@linux.ibm.com, jsnitsel@redhat.com,
	Desnes Nunes <desnesn@redhat.com>
Subject: [PATCH 1/3] dma-debug: small dma_debug_entry's comment and variable name updates
Date: Wed, 15 Mar 2023 16:21:28 -0300	[thread overview]
Message-ID: <20230315192130.970021-2-desnesn@redhat.com> (raw)
In-Reply-To: <20230315192130.970021-1-desnesn@redhat.com>

Small update on dma_debug_entry's struct commentary and also standardize
the usage of 'dma_addr' variable name from debug_dma_map_page() on
debug_dma_unmap_page(), and similarly on debug_dma_free_coherent()

Signed-off-by: Desnes Nunes <desnesn@redhat.com>
---
 kernel/dma/debug.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
index 18c93c2276ca..e0ad8db1ec25 100644
--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -52,7 +52,8 @@ enum map_err_types {
 /**
  * struct dma_debug_entry - track a dma_map* or dma_alloc_coherent mapping
  * @list: node on pre-allocated free_entries list
- * @dev: 'dev' argument to dma_map_{page|single|sg} or dma_alloc_coherent
+ * @dev: pointer to the device driver
+ * @dev_addr: 'dev' argument to dma_map_{page|single|sg} or dma_alloc_coherent
  * @size: length of the mapping
  * @type: single, page, sg, coherent
  * @direction: enum dma_data_direction
@@ -1262,13 +1263,13 @@ void debug_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 }
 EXPORT_SYMBOL(debug_dma_mapping_error);
 
-void debug_dma_unmap_page(struct device *dev, dma_addr_t addr,
+void debug_dma_unmap_page(struct device *dev, dma_addr_t dma_addr,
 			  size_t size, int direction)
 {
 	struct dma_debug_entry ref = {
 		.type           = dma_debug_single,
 		.dev            = dev,
-		.dev_addr       = addr,
+		.dev_addr       = dma_addr,
 		.size           = size,
 		.direction      = direction,
 	};
@@ -1403,13 +1404,13 @@ void debug_dma_alloc_coherent(struct device *dev, size_t size,
 }
 
 void debug_dma_free_coherent(struct device *dev, size_t size,
-			 void *virt, dma_addr_t addr)
+			 void *virt, dma_addr_t dma_addr)
 {
 	struct dma_debug_entry ref = {
 		.type           = dma_debug_coherent,
 		.dev            = dev,
 		.offset		= offset_in_page(virt),
-		.dev_addr       = addr,
+		.dev_addr       = dma_addr,
 		.size           = size,
 		.direction      = DMA_BIDIRECTIONAL,
 	};
-- 
2.39.1


  reply	other threads:[~2023-03-15 19:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 19:21 [PATCH 0/3] scsi: smartpqi: fix DMA overlapping mappings asymmetry Desnes Nunes
2023-03-15 19:21 ` Desnes Nunes [this message]
2023-03-16 10:24   ` [PATCH 1/3] dma-debug: small dma_debug_entry's comment and variable name updates Robin Murphy
2023-03-16 14:06     ` Desnes Nunes
2023-03-15 19:21 ` [PATCH 2/3] dma-debug: add cacheline to user/kernel space dump messages Desnes Nunes
2023-03-15 21:46   ` kernel test robot
2023-03-16  1:32   ` kernel test robot
2023-03-15 19:21 ` [PATCH 3/3] scsi: smartpqi: fix DMA overlapping mappings asymmetry Desnes Nunes

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=20230315192130.970021-2-desnesn@redhat.com \
    --to=desnesn@redhat.com \
    --cc=don.brace@microchip.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=jejb@linux.ibm.com \
    --cc=jsnitsel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=martin.petersen@oracle.com \
    --cc=robin.murphy@arm.com \
    --cc=storagedev@microchip.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.