* [PATCH] crypto: aspeed/hash: Use memcpy_from_sglist() in aspeed_ahash_dma_prepare()
@ 2026-03-27 9:24 Paul Louvel
2026-03-30 9:36 ` Neal Liu
2026-04-03 1:08 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Paul Louvel @ 2026-03-27 9:24 UTC (permalink / raw)
To: Neal Liu, Herbert Xu, David S. Miller, Joel Stanley,
Andrew Jeffery
Cc: Thomas Petazzoni, Paul Louvel, linux-aspeed, linux-crypto,
linux-arm-kernel, linux-kernel
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>
---
drivers/crypto/aspeed/aspeed-hace-hash.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/aspeed/aspeed-hace-hash.c b/drivers/crypto/aspeed/aspeed-hace-hash.c
index f8f37c9d5f3c..6f0d03cfbefc 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(
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: aspeed/hash: Use memcpy_from_sglist() in aspeed_ahash_dma_prepare()
2026-03-27 9:24 [PATCH] crypto: aspeed/hash: Use memcpy_from_sglist() in aspeed_ahash_dma_prepare() Paul Louvel
@ 2026-03-30 9:36 ` Neal Liu
2026-04-03 1:08 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Neal Liu @ 2026-03-30 9:36 UTC (permalink / raw)
To: Paul Louvel, Herbert Xu, David S. Miller, Joel Stanley,
Andrew Jeffery
Cc: Thomas Petazzoni, linux-aspeed@lists.ozlabs.org,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
> 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>
> ---
> drivers/crypto/aspeed/aspeed-hace-hash.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/aspeed/aspeed-hace-hash.c b/drivers/crypto/aspeed/aspeed-hace-hash.c
> index f8f37c9d5f3c..6f0d03cfbefc 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(
> --
> 2.53.0
Reviewed-by: Neal Liu <neal_liu@aspeedtech.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: aspeed/hash: Use memcpy_from_sglist() in aspeed_ahash_dma_prepare()
2026-03-27 9:24 [PATCH] crypto: aspeed/hash: Use memcpy_from_sglist() in aspeed_ahash_dma_prepare() Paul Louvel
2026-03-30 9:36 ` Neal Liu
@ 2026-04-03 1:08 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2026-04-03 1:08 UTC (permalink / raw)
To: Paul Louvel
Cc: Neal Liu, David S. Miller, Joel Stanley, Andrew Jeffery,
Thomas Petazzoni, linux-aspeed, linux-crypto, linux-arm-kernel,
linux-kernel
On Fri, Mar 27, 2026 at 10:24:18AM +0100, Paul Louvel wrote:
> 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>
> ---
> drivers/crypto/aspeed/aspeed-hace-hash.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-03 1:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-27 9:24 [PATCH] crypto: aspeed/hash: Use memcpy_from_sglist() in aspeed_ahash_dma_prepare() Paul Louvel
2026-03-30 9:36 ` Neal Liu
2026-04-03 1:08 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox