Commit fd4609a8 authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Herbert Xu

[CRYPTO] lrw: Replace all adds to big endians variables with be*_add_cpu

replace all:
big_endian_variable = cpu_to_beX(beX_to_cpu(big_endian_variable) +
					expression_in_cpu_byteorder);
with:
	beX_add_cpu(&big_endian_variable, expression_in_cpu_byteorder);
Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f0df30b1
...@@ -91,8 +91,9 @@ struct sinfo { ...@@ -91,8 +91,9 @@ struct sinfo {
static inline void inc(be128 *iv) static inline void inc(be128 *iv)
{ {
if (!(iv->b = cpu_to_be64(be64_to_cpu(iv->b) + 1))) be64_add_cpu(&iv->b, 1);
iv->a = cpu_to_be64(be64_to_cpu(iv->a) + 1); if (!iv->b)
be64_add_cpu(&iv->a, 1);
} }
static inline void lrw_round(struct sinfo *s, void *dst, const void *src) static inline void lrw_round(struct sinfo *s, void *dst, const void *src)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment