]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - crypto/rmd320.c
[CRYPTO] rmd: Use pointer form of endian swapping operations
[karo-tx-linux.git] / crypto / rmd320.c
index 5b172f89e0c978d065956fe40a5bba20b02f445b..dba03ecf53603f2fc7ad726426eaf5f46efef84e 100644 (file)
@@ -47,7 +47,7 @@ struct rmd320_ctx {
 #define F5(x, y, z) (x ^ (y | ~z))
 
 #define ROUND(a, b, c, d, e, 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)) + (e); \
        (c) = rol32((c), 10); \
 }
@@ -353,7 +353,7 @@ static void rmd320_final(struct crypto_tfm *tfm, u8 *out)
 
        /* Store state in digest */
        for (i = 0; i < 10; i++)
-               dst[i] = cpu_to_le32(rctx->state[i]);
+               dst[i] = cpu_to_le32p(&rctx->state[i]);
 
        /* Wipe context */
        memset(rctx, 0, sizeof(*rctx));