Skip to contentSkip to conversation

iommu/dma: fix grammar in comments

PATCH In review weimin xiong 3 participants 3 messages Jul 14 – Jul 23

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/dma: fix grammar in comments

From: xiongweimin <[email protected]>

Clarify two slightly mangled DMA-IOMMU mapping comments.

---
 drivers/iommu/dma-iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/dma-iommu.c +2 -2
index 9abaec070..2c28b951f 100644
@@ -1489,7 +1489,7 @@ int iommu_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
 		 *   based purely on segment lengths without needing to know
 		 *   the actual addresses beforehand.
 		 * - The mask must be a power of 2, so pad_len == 0 if
-		 *   iova_len == 0, thus we cannot dereference prev the first
+		 *   iova_len == 0, thus we cannot dereference prev, the first
 		 *   time through here (i.e. before it has a meaningful value).
 		 */
 		if (pad_len && pad_len < s_length - 1) {
@@ -1593,7 +1593,7 @@ static void __iommu_dma_free(struct device *dev, size_t size, void *cpu_addr)
 
 	if (is_vmalloc_addr(cpu_addr)) {
 		/*
-		 * If it the address is remapped, then it's either non-coherent
+		 * If the address is remapped, then it is either non-coherent
 		 * or highmem CMA, or an iommu_dma_alloc_remap() construction.
 		 */
 		pages = dma_common_find_pages(cpu_addr);
Signature · 5 lines
2.43.0


No virus found
		Checked by Hillstone Network AntiVirus
maintainer
#1 lore raw
Quoted 14 lines · weimin xiong

From: xiongweimin <[email protected]>

Clarify two slightly mangled DMA-IOMMU mapping comments.

---
 drivers/iommu/dma-iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/dma-iommu.c +0 -0
index 9abaec070..2c28b951f 100644

drivers/iommu/dma-iommu.c int iommu_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, · line 1492

Quoted 5 lines
drivers/iommu/dma-iommu.c +1 -1
@@ -1489,7 +1489,7 @@ int iommu_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
 		 *   based purely on segment lengths without needing to know
 		 *   the actual addresses beforehand.
 		 * - The mask must be a power of 2, so pad_len == 0 if
-		 *   iova_len == 0, thus we cannot dereference prev the first
+		 *   iova_len == 0, thus we cannot dereference prev, the first

I don't think adding the extra comma makes much sense here: ^.

I'll hoover up your other typo fixes onto their own 'typo' branch and leave it up to Joerg as to whether he decides to apply/squash/ignore them.

Will

maintainer
#2 lore raw
Quoted 10 lines · Will Deacon
Quoted 9 lines · weimin xiong

From: xiongweimin <[email protected]>

Clarify two slightly mangled DMA-IOMMU mapping comments.

---
  drivers/iommu/dma-iommu.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines

drivers/iommu/dma-iommu.c int iommu_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, · line 1492

Quoted 10 lines
drivers/iommu/dma-iommu.c +1 -1
index 9abaec070..2c28b951f 100644
@@ -1489,7 +1489,7 @@ int iommu_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
  		 *   based purely on segment lengths without needing to know
  		 *   the actual addresses beforehand.
  		 * - The mask must be a power of 2, so pad_len == 0 if
-		 *   iova_len == 0, thus we cannot dereference prev the first
+		 *   iova_len == 0, thus we cannot dereference prev, the first

I don't think adding the extra comma makes much sense here: ^.

Indeed, "the first time through here" is not a separate clause, it makes no grammatical sense on its own. The existing sentence is correct.

("it the address" does appear to be botched editing on my part though, oops!)

Thanks,
Robin.

(Whose email provider sends 163.com and various other domains straight to /dev/null, not even quarantine...)

Quoted 5 lines

I'll hoover up your other typo fixes onto their own 'typo' branch and leave it up to Joerg as to whether he decides to apply/squash/ignore them.

Will