linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] crypto: atmel-aes - convert to use be32_add_cpu()
@ 2020-09-14  4:17 Liu Shixin
  2020-09-25  8:11 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Shixin @ 2020-09-14  4:17 UTC (permalink / raw)
  To: David S . Miller, Herbert Xu, Nicolas Ferre
  Cc: linux-crypto, linux-arm-kernel, linux-kernel, Liu Shixin

Convert cpu_to_be32(be32_to_cpu(E1) + E2) to use be32_add_cpu().

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/crypto/atmel-aes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index a6e14491e080..b1d286004295 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -1539,7 +1539,7 @@ static int atmel_aes_gcm_length(struct atmel_aes_dev *dd)
 
 	/* Write incr32(J0) into IV. */
 	j0_lsw = j0[3];
-	j0[3] = cpu_to_be32(be32_to_cpu(j0[3]) + 1);
+	be32_add_cpu(&j0[3], 1);
 	atmel_aes_write_block(dd, AES_IVR(0), j0);
 	j0[3] = j0_lsw;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] crypto: atmel-aes - convert to use be32_add_cpu()
  2020-09-14  4:17 [PATCH -next] crypto: atmel-aes - convert to use be32_add_cpu() Liu Shixin
@ 2020-09-25  8:11 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2020-09-25  8:11 UTC (permalink / raw)
  To: Liu Shixin
  Cc: David S . Miller, Nicolas Ferre, linux-crypto, linux-arm-kernel,
	linux-kernel

On Mon, Sep 14, 2020 at 12:17:46PM +0800, Liu Shixin wrote:
> Convert cpu_to_be32(be32_to_cpu(E1) + E2) to use be32_add_cpu().
> 
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
>  drivers/crypto/atmel-aes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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] 2+ messages in thread

end of thread, other threads:[~2020-09-25  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14  4:17 [PATCH -next] crypto: atmel-aes - convert to use be32_add_cpu() Liu Shixin
2020-09-25  8:11 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).