From: Paul Louvel Date: Fri, 27 Mar 2026 09:24:18 +0000 (+0100) Subject: crypto: aspeed - Use memcpy_from_sglist() in aspeed_ahash_dma_prepare() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51d0f5020deeef1c678b7e3e71420b2842215662;p=thirdparty%2Flinux.git 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 Reviewed-by: Neal Liu Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/aspeed/aspeed-hace-hash.c b/drivers/crypto/aspeed/aspeed-hace-hash.c index f8f37c9d5f3c3..6f0d03cfbefcd 100644 --- a/drivers/crypto/aspeed/aspeed-hace-hash.c +++ b/drivers/crypto/aspeed/aspeed-hace-hash.c @@ -182,8 +182,7 @@ static int aspeed_ahash_dma_prepare(struct aspeed_hace_dev *hace_dev) final = true; } else length -= remain; - scatterwalk_map_and_copy(hash_engine->ahash_src_addr, rctx->src_sg, - rctx->offset, length, 0); + memcpy_from_sglist(hash_engine->ahash_src_addr, rctx->src_sg, rctx->offset, length); aspeed_ahash_update_counter(rctx, length); if (final) length += aspeed_ahash_fill_padding(