mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
This commit is contained in:
parent
5469d16e71
commit
51d0f5020d
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user