From: Marcin Slusarz Date: Fri, 14 Mar 2008 08:22:53 +0000 (+0800) Subject: [CRYPTO] lrw: Replace all adds to big endians variables with be*_add_cpu X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fd4609a8e00a867303783ade62d67953fb72adc8;p=mv-sheeva.git [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 --- 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)