From: Liu Shixin Date: Mon, 14 Sep 2020 04:17:46 +0000 (+0800) Subject: crypto: atmel-aes - convert to use be32_add_cpu() X-Git-Tag: v5.15~2545^2~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb7c2f4654fee2a41703b3d51d9a97492c2838e9;p=platform%2Fkernel%2Flinux-starfive.git crypto: atmel-aes - convert to use be32_add_cpu() Convert cpu_to_be32(be32_to_cpu(E1) + E2) to use be32_add_cpu(). Signed-off-by: Liu Shixin Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index a6e1449..b1d2860 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;