aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2005-12-22 17:12:25 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-10 19:15:33 -0400
commitd08f74e58cad8f1844f6e01636a76dd52d41bb0f (patch)
tree9a365f16c8faa37f9115649c196972b33ed19f78 /crypto
parent56052d525a05ba9e53d4f11be2d5deee64924514 (diff)
[PATCH] serpent: fix endian warnings
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/serpent.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/serpent.c b/crypto/serpent.c
index 465d091cd3ec..2b0a19a44ec5 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)
364{ 364{
365 struct serpent_ctx *ctx = crypto_tfm_ctx(tfm); 365 struct serpent_ctx *ctx = crypto_tfm_ctx(tfm);
366 const u32 366 const u32
367 *k = ctx->expkey, 367 *k = ctx->expkey;
368 *s = (const u32 *)src; 368 const __le32 *s = (const __le32 *)src;
369 u32 *d = (u32 *)dst, 369 __le32 *d = (__le32 *)dst;
370 r0, r1, r2, r3, r4; 370 u32 r0, r1, r2, r3, r4;
371 371
372/* 372/*
373 * Note: The conversions between u8* and u32* might cause trouble 373 * 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)
423{ 423{
424 struct serpent_ctx *ctx = crypto_tfm_ctx(tfm); 424 struct serpent_ctx *ctx = crypto_tfm_ctx(tfm);
425 const u32 425 const u32
426 *k = ((struct serpent_ctx *)ctx)->expkey, 426 *k = ((struct serpent_ctx *)ctx)->expkey;
427 *s = (const u32 *)src; 427 const __le32 *s = (const __le32 *)src;
428 u32 *d = (u32 *)dst, 428 __le32 *d = (__le32 *)dst;
429 r0, r1, r2, r3, r4; 429 u32 r0, r1, r2, r3, r4;
430 430
431 r0 = le32_to_cpu(s[0]); 431 r0 = le32_to_cpu(s[0]);
432 r1 = le32_to_cpu(s[1]); 432 r1 = le32_to_cpu(s[1]);