From fd4609a8e00a867303783ade62d67953fb72adc8 Mon Sep 17 00:00:00 2001 From: Marcin Slusarz Date: Fri, 14 Mar 2008 16:22:53 +0800 Subject: [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: Marcin Slusarz Cc: David S. Miller Cc: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Herbert Xu --- crypto/lrw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/lrw.c b/crypto/lrw.c index 9d52e580d10..8ef664e3bcd 100644 --- a/crypto/lrw.c +++ b/crypto/lrw.c @@ -91,8 +91,9 @@ struct sinfo { static inline void inc(be128 *iv) { - if (!(iv->b = cpu_to_be64(be64_to_cpu(iv->b) + 1))) - iv->a = cpu_to_be64(be64_to_cpu(iv->a) + 1); + be64_add_cpu(&iv->b, 1); + if (!iv->b) + be64_add_cpu(&iv->a, 1); } static inline void lrw_round(struct sinfo *s, void *dst, const void *src) -- cgit v1.2.3-18-g5258