Skip to content

Commit

Permalink
[CRYPTO] lrw: Replace all adds to big endians variables with be*_add_cpu
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Roel Kluin <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
mslusarz authored and herbertx committed Apr 21, 2008
1 parent f0df30b commit fd4609a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crypto/lrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fd4609a

Please sign in to comment.