aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2018-04-09 18:59:14 +0100
committerChristoph Hellwig <hch@lst.de>2018-04-23 14:44:17 +0200
commit41d0bbc749471522714efd0649b7e033fefcbfb4 (patch)
treef7a699753b6d55048306fea72b6c84af0628cbe6 /drivers/base
parentdma-direct: don't retry allocation for no-op GFP_DMA (diff)
downloadlinux-dev-41d0bbc749471522714efd0649b7e033fefcbfb4.tar.xz
linux-dev-41d0bbc749471522714efd0649b7e033fefcbfb4.zip
dma-coherent: clarify dma_mmap_from_dev_coherent documentation
The use of "correctly mapped" here is misleading, since it can give the wrong expectation in the case that the memory *should* have been mapped from the per-device pool, but doing so failed for other reasons. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/dma-coherent.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c
index 1e6396bb807b..597d40893862 100644
--- a/drivers/base/dma-coherent.c
+++ b/drivers/base/dma-coherent.c
@@ -312,8 +312,9 @@ static int __dma_mmap_from_coherent(struct dma_coherent_mem *mem,
* This checks whether the memory was allocated from the per-device
* coherent memory pool and if so, maps that memory to the provided vma.
*
- * Returns 1 if we correctly mapped the memory, or 0 if the caller should
- * proceed with mapping memory from generic pools.
+ * Returns 1 if @vaddr belongs to the device coherent pool and the caller
+ * should return @ret, or 0 if they should proceed with mapping memory from
+ * generic areas.
*/
int dma_mmap_from_dev_coherent(struct device *dev, struct vm_area_struct *vma,
void *vaddr, size_t size, int *ret)