From: Alexey Dobriyan Date: Thu, 22 Dec 2005 22:12:25 +0000 (+0300) Subject: [PATCH] serpent: fix endian warnings X-Git-Tag: v2.6.19-rc2~159 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d08f74e58cad8f1844f6e01636a76dd52d41bb0f;p=linux-2.6 [PATCH] serpent: fix endian warnings Signed-off-by: Alexey Dobriyan Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- diff --git a/crypto/serpent.c b/crypto/serpent.c index 465d091cd3..2b0a19a44e 100644 --- a/crypto/serpent.c +++ b/crypto/serpent.c @@ -364,10 +364,10 @@ static void serpent_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { struct serpent_ctx *ctx = crypto_tfm_ctx(tfm); const u32 - *k = ctx->expkey, - *s = (const u32 *)src; - u32 *d = (u32 *)dst, - r0, r1, r2, r3, r4; + *k = ctx->expkey; + const __le32 *s = (const __le32 *)src; + __le32 *d = (__le32 *)dst; + u32 r0, r1, r2, r3, r4; /* * Note: The conversions between u8* and u32* might cause trouble @@ -423,10 +423,10 @@ static void serpent_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { struct serpent_ctx *ctx = crypto_tfm_ctx(tfm); const u32 - *k = ((struct serpent_ctx *)ctx)->expkey, - *s = (const u32 *)src; - u32 *d = (u32 *)dst, - r0, r1, r2, r3, r4; + *k = ((struct serpent_ctx *)ctx)->expkey; + const __le32 *s = (const __le32 *)src; + __le32 *d = (__le32 *)dst; + u32 r0, r1, r2, r3, r4; r0 = le32_to_cpu(s[0]); r1 = le32_to_cpu(s[1]);