serpent: fix endian warnings
diff mbox series

Message ID 20051222221225.GC16883@mipter.zuzino.mipt.ru
State New, archived
Headers show
Series
  • serpent: fix endian warnings
Related show

Commit Message

Alexey Dobriyan Dec. 22, 2005, 10:12 p.m. UTC
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 crypto/serpent.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Patch
diff mbox series

--- a/crypto/serpent.c
+++ b/crypto/serpent.c
@@ -367,10 +367,10 @@  static int serpent_setkey(void *ctx, con
 static void serpent_encrypt(void *ctx, u8 *dst, const u8 *src)
 {
 	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;
 
 /*
  * Note: The conversions between u8* and u32* might cause trouble
@@ -425,10 +425,10 @@  static void serpent_encrypt(void *ctx, u
 static void serpent_decrypt(void *ctx, u8 *dst, const u8 *src)
 {
 	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]);