]> err.no Git - linux-2.6/commitdiff
[CRYPTO] lrw: Replace all adds to big endians variables with be*_add_cpu
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Fri, 14 Mar 2008 08:22:53 +0000 (16:22 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 21 Apr 2008 02:19:22 +0000 (10:19 +0800)
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 <marcin.slusarz@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/lrw.c

index 9d52e580d10a4d34b5117f801f98cf6bd4249b5c..8ef664e3bcd9a90c93a5436e551549e72df1ff82 100644 (file)
@@ -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)