]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - crypto/rmd128.c
[CRYPTO] rmd: Use pointer form of endian swapping operations
[linux-2.6-omap-h63xx.git] / crypto / rmd128.c
index 89a535aa6eb8994033d933c8c68b342436f86675..1a481df66913b296243aa401fc497a89f8bb9bf2 100644 (file)
@@ -44,7 +44,7 @@ struct rmd128_ctx {
 #define F4(x, y, z) (y ^ (z & (x ^ y)))        /* z ? x : y */
 
 #define ROUND(a, b, c, d, f, k, x, s)  { \
-       (a) += f((b), (c), (d)) + le32_to_cpu(x) + (k); \
+       (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k);     \
        (a) = rol32((a), (s)); \
 }
 
@@ -285,7 +285,7 @@ static void rmd128_final(struct crypto_tfm *tfm, u8 *out)
 
        /* Store state in digest */
        for (i = 0; i < 4; i++)
-               dst[i] = cpu_to_le32(rctx->state[i]);
+               dst[i] = cpu_to_le32p(&rctx->state[i]);
 
        /* Wipe context */
        memset(rctx, 0, sizeof(*rctx));