2010/8/12 Russell King - ARM Linux [off-list ref]:
On Thu, Aug 12, 2010 at 03:58:08PM +0200, Linus Walleij wrote:
quoted
In arch/arm/mm/dma-mapping.c
dma_map_sg() returns 0 on a mapping error, and the same as
passed in the third parameter on success.
Rabin is right - dma_map_sg() is allowed to return fewer entries than
was passed as it is allowed to coalesce entries together. ?Please don't
use the implementation as a source of how things should behave, instead
read the documentation in Documentation/DMA-API.txt:
Aha yeah I get it now, I will take that as tonights reading excercise,
And it makes perfect sense too.
I seem to be in bad company, a quick search in LXR reveals
numerous instances of this error throughout the kernel tree I'll
put it on my TODO list to fix a few of them up.
Yours,
Linus Walleij