Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: aspeed - Use memcpy_from_sglist() in aspeed_ahash_dma_prepare()

Replace scatterwalk_map_and_copy() with memcpy_from_sglist() in
aspeed_ahash_dma_prepare(). The latter provides a simpler interface
without requiring a direction parameter, making the code easier to
read and less error-prone.

No functional change intended.

Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
Reviewed-by: Neal Liu <neal_liu@aspeedtech.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Paul Louvel and committed by
Herbert Xu
51d0f502 5469d16e

+1 -2
+1 -2
drivers/crypto/aspeed/aspeed-hace-hash.c
··· 182 182 final = true; 183 183 } else 184 184 length -= remain; 185 - scatterwalk_map_and_copy(hash_engine->ahash_src_addr, rctx->src_sg, 186 - rctx->offset, length, 0); 185 + memcpy_from_sglist(hash_engine->ahash_src_addr, rctx->src_sg, rctx->offset, length); 187 186 aspeed_ahash_update_counter(rctx, length); 188 187 if (final) 189 188 length += aspeed_ahash_fill_padding(