diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-03-14 04:22:53 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-04-20 22:19:22 -0400 |
commit | fd4609a8e00a867303783ade62d67953fb72adc8 (patch) | |
tree | 465bbc80520cf83adf8493cf5c8ff265093bb317 | |
parent | f0df30b1f7f2bf8588613b2c012b8859b06849f1 (diff) |
[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 <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>
-rw-r--r-- | crypto/lrw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c index 9d52e580d10a..8ef664e3bcd9 100644 --- a/crypto/lrw.c +++ b/crypto/lrw.c | |||
@@ -91,8 +91,9 @@ struct sinfo { | |||
91 | 91 | ||
92 | static inline void inc(be128 *iv) | 92 | static inline void inc(be128 *iv) |
93 | { | 93 | { |
94 | if (!(iv->b = cpu_to_be64(be64_to_cpu(iv->b) + 1))) | 94 | be64_add_cpu(&iv->b, 1); |
95 | iv->a = cpu_to_be64(be64_to_cpu(iv->a) + 1); | 95 | if (!iv->b) |
96 | be64_add_cpu(&iv->a, 1); | ||
96 | } | 97 | } |
97 | 98 | ||
98 | static inline void lrw_round(struct sinfo *s, void *dst, const void *src) | 99 | static inline void lrw_round(struct sinfo *s, void *dst, const void *src) |