]> git.baikalelectronics.ru Git - kernel.git/commit
sparc/io-unit: fix ->map_sg return value
authorChristoph Hellwig <hch@lst.de>
Sun, 16 Dec 2018 09:20:04 +0000 (10:20 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 19 Dec 2018 17:00:40 +0000 (18:00 +0100)
commit258443362dc3183c6601c1b8e4ded5e07ffd506c
tree1fdb67baf481f1601ed9791d2fd612b76726924c
parent21b5cf01421d92f1cd5b547567b0149e251a351e
sparc/io-unit: fix ->map_sg return value

Just decrementing the sz value will lead to an incorrect return value.
Instead of just introducing a local variable switch to the standard
for_each_sg helper and standard naming of the arguments.

Fixes: 088ffe430b ("sparc: remove the sparc32_dma_ops indirection")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
arch/sparc/mm/io-unit.c