All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix the parameter of dma_map_sg()
@ 2021-02-09  6:59 chenxiang
  2021-02-09  6:59 ` [PATCH 1/4] crypto: amlogic - Fix the parameter of dma_unmap_sg() chenxiang
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: chenxiang @ 2021-02-09  6:59 UTC (permalink / raw)
  To: clabbe.montjoie, clabbe, gcherian, herbert, davem
  Cc: linux-crypto, linuxarm, prime.zeng, Xiang Chen

From: Xiang Chen <chenxiang66@hisilicon.com>

According to Documentation/core-api/dma-api-howto.rst, the parameters 
of dma_unmap_sg() must be the same as those which are passed in to the 
scatter/gather mapping API.
But for some drivers under crypto, the <nents> parameter of dma_unmap_sg() 
is number of elements after mapping. So fix them.

Part of the document is as follows:

To unmap a scatterlist, just call::

        dma_unmap_sg(dev, sglist, nents, direction);
	
Again, make sure DMA activity has already finished.
	
	.. 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.

chenxiang (4):
  crypto: amlogic - Fix the parameter of dma_unmap_sg()
  crypto: cavium - Fix the parameter of dma_unmap_sg()
  crypto: ux500 - Fix the parameter of dma_unmap_sg()
  crypto: allwinner - Fix the parameter of dma_unmap_sg()

 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 9 ++++++---
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c   | 3 ++-
 drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 9 ++++++---
 drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c   | 3 ++-
 drivers/crypto/amlogic/amlogic-gxl-cipher.c         | 6 +++---
 drivers/crypto/cavium/nitrox/nitrox_reqmgr.c        | 8 ++++----
 drivers/crypto/ux500/cryp/cryp_core.c               | 4 ++--
 drivers/crypto/ux500/hash/hash_core.c               | 2 +-
 8 files changed, 26 insertions(+), 18 deletions(-)

-- 
2.8.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-03-04  4:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09  6:59 [PATCH 0/4] Fix the parameter of dma_map_sg() chenxiang
2021-02-09  6:59 ` [PATCH 1/4] crypto: amlogic - Fix the parameter of dma_unmap_sg() chenxiang
2021-02-09  6:59 ` [PATCH 2/4] crypto: cavium " chenxiang
2021-03-03  8:59   ` Herbert Xu
2021-03-04  2:18     ` chenxiang (M)
2021-03-04  4:24       ` Herbert Xu
2021-02-09  6:59 ` [PATCH 3/4] crypto: ux500 " chenxiang
2021-02-09  6:59 ` [PATCH 4/4] crypto: allwinner " chenxiang
2021-02-10 14:25   ` Corentin Labbe
2021-02-20  1:51 ` [PATCH 0/4] Fix the parameter of dma_map_sg() chenxiang (M)
2021-02-20  2:17   ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.