]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
asm/dma-mapping-common: Clarify output of dma_map_sg_attrs
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Wed, 11 Feb 2015 12:53:14 +0000 (13:53 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 9 Mar 2015 12:05:47 +0000 (13:05 +0100)
commit8582e267e9a29ccfd2151c5d74bc2b1440dfb827
tree3b4cae0c874c6a7299e4e27929e0d972a91d5150
parent9eccca0843205f87c00404b663188b88eb248051
asm/dma-mapping-common: Clarify output of dma_map_sg_attrs

Although dma_map_sg_attrs returns 0 on error and it cannot return a
value < 0, the function returns a signed integer.

Most of the time, this function is used with a scatterlist structure.
This structure uses an unsigned integer for the number of memory.

A dma developer that has not read in detail DMA-API.txt, can wrongly
return a value < 0 on error.

The comment will help the driver developer, and the WARN_ON the dma
developer.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
include/asm-generic/dma-mapping-common.h