lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Sep 2015 14:41:10 +0300
From:	Sakari Ailus <sakari.ailus@...ux.intel.com>
To:	linux-doc@...r.kernel.org
Cc:	bhelgaas@...gle.com, corbet@....net, linux-kernel@...r.kernel.org,
	djkurtz@...omium.org
Subject: [PATCH 2/2] arm: mm: Fix comments in sg_sync functions

The comment on the usage of arm_dma_sync_sg_for_cpu(),
arm_dma_sync_sg_for_device(), arm_iommu_sync_sg_for_cpu() and
arm_iommu_sync_sg_for_device() functions wrongly noted that the "nelems"
parameter is the number of sglist entries returned by dma_map_sg(), while
this must be the number of entiries passed to dma_map_sg() instead.

Suggested-by: Daniel Kurtz <djkurtz@...omium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
---
 arch/arm/mm/dma-mapping.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index e626043..1c0154a 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -958,7 +958,7 @@ void arm_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
  * arm_dma_sync_sg_for_cpu
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @sg: list of buffers
- * @nents: number of buffers to map (returned from dma_map_sg)
+ * @nents: number of buffers to sync (same as was passed to dma_map_sg)
  * @dir: DMA transfer direction (same as was passed to dma_map_sg)
  */
 void arm_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
@@ -977,7 +977,7 @@ void arm_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
  * arm_dma_sync_sg_for_device
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @sg: list of buffers
- * @nents: number of buffers to map (returned from dma_map_sg)
+ * @nents: number of buffers to sync (same as was passed to dma_map_sg)
  * @dir: DMA transfer direction (same as was passed to dma_map_sg)
  */
 void arm_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
@@ -1672,7 +1672,7 @@ void arm_iommu_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
  * arm_iommu_sync_sg_for_cpu
  * @dev: valid struct device pointer
  * @sg: list of buffers
- * @nents: number of buffers to map (returned from dma_map_sg)
+ * @nents: number of buffers to sync (same as was passed to dma_map_sg)
  * @dir: DMA transfer direction (same as was passed to dma_map_sg)
  */
 void arm_iommu_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
@@ -1690,7 +1690,7 @@ void arm_iommu_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
  * arm_iommu_sync_sg_for_device
  * @dev: valid struct device pointer
  * @sg: list of buffers
- * @nents: number of buffers to map (returned from dma_map_sg)
+ * @nents: number of buffers to sync (same as was passed to dma_map_sg)
  * @dir: DMA transfer direction (same as was passed to dma_map_sg)
  */
 void arm_iommu_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
-- 
2.1.0.231.g7484e3b

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ