summaryrefslogtreecommitdiffstats
path: root/mm/nommu.c
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2019-11-13 05:37:42 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-13 21:54:15 +0800
commit74887542fdcc92ad06a48c0cca17cdf09fc8aa00 (patch)
tree10227f52e3eec4716e44540ad8b1e7a3297f5028 /mm/nommu.c
parent596fd8dffb745afcebc0ec6968e17fe29f02044c (diff)
downloadlinux-stable-74887542fdcc92ad06a48c0cca17cdf09fc8aa00.tar.gz
linux-stable-74887542fdcc92ad06a48c0cca17cdf09fc8aa00.tar.bz2
linux-stable-74887542fdcc92ad06a48c0cca17cdf09fc8aa00.zip
tty: serial: pch_uart: correct usage of dma_unmap_sg
Per Documentation/DMA-API-HOWTO.txt, To unmap a scatterlist, just call: dma_unmap_sg(dev, sglist, nents, direction); .. note:: The 'nents' argument to the dma_unmap_sg call must be the _same_ one you passed into the dma_map_sg call, it should _NOT_ be the 'count' value _returned_ from the dma_map_sg call. However in the driver, priv->nent is directly assigned with value returned from dma_map_sg, and dma_unmap_sg use priv->nent for unmap, this breaks the API usage. So introduce a new entry orig_nent to remember 'nents'. Fixes: da3564ee027e ("pch_uart: add multi-scatter processing") Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/1573623259-6339-1-git-send-email-peng.fan@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/nommu.c')
0 files changed, 0 insertions, 0 deletions