summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-12-10 17:18:40 -0800
committerEric Biggers <ebiggers@kernel.org>2026-01-12 11:07:50 -0800
commit73c203fe5564e6e4ec37b7e140214a334d584369 (patch)
tree019431127460f36ef4a174293663ee2bcd21ade0 /crypto
parentcd912b3452d14c40e77b3be82854df00bfd38a41 (diff)
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 <herbert@gondor.apana.org.au> Link: https://lore.kernel.org/r/20251211011846.8179-9-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/adiantum.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/adiantum.c b/crypto/adiantum.c
index 519e95228ad8..6d882f926ab0 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);