From: Eric Biggers Date: Thu, 11 Dec 2025 01:18:40 +0000 (-0800) Subject: crypto: adiantum - Use memcpy_{to,from}_sglist() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73c203fe5564e6e4ec37b7e140214a334d584369;p=thirdparty%2Flinux.git crypto: adiantum - Use memcpy_{to,from}_sglist() Call the newer, easier-to-read functions memcpy_to_sglist() and memcpy_from_sglist() directly instead of calling scatterwalk_map_and_copy(). No change in behavior. Acked-by: Herbert Xu Link: https://lore.kernel.org/r/20251211011846.8179-9-ebiggers@kernel.org Signed-off-by: Eric Biggers --- diff --git a/crypto/adiantum.c b/crypto/adiantum.c index 519e95228ad84..6d882f926ab08 100644 --- a/crypto/adiantum.c +++ b/crypto/adiantum.c @@ -427,8 +427,8 @@ static int adiantum_finish(struct skcipher_request *req) /* Slow path that works for any destination scatterlist */ adiantum_hash_message(req, dst, &digest); le128_sub(&rctx->rbuf.bignum, &rctx->rbuf.bignum, &digest); - scatterwalk_map_and_copy(&rctx->rbuf.bignum, dst, - bulk_len, sizeof(le128), 1); + memcpy_to_sglist(dst, bulk_len, &rctx->rbuf.bignum, + sizeof(le128)); } return 0; } @@ -477,8 +477,8 @@ static int adiantum_crypt(struct skcipher_request *req, bool enc) } else { /* Slow path that works for any source scatterlist */ adiantum_hash_message(req, src, &digest); - scatterwalk_map_and_copy(&rctx->rbuf.bignum, src, - bulk_len, sizeof(le128), 0); + memcpy_from_sglist(&rctx->rbuf.bignum, src, bulk_len, + sizeof(le128)); } le128_add(&rctx->rbuf.bignum, &rctx->rbuf.bignum, &rctx->header_hash); le128_add(&rctx->rbuf.bignum, &rctx->rbuf.bignum, &digest);