Skip to contentSkip to conversation

crypto/tea.c: fix sparse warnings

PATCH In review [email protected] 1 participant 2 messages Mar 19, 2005 – Mar 20, 2005 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 crypto/tea.c: fix sparse warnings

---

 kj-domen/crypto/tea.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
crypto/tea.c renamed from crypto/tea.c~sparse-crypto_tea +2 -2
diff -puN crypto/tea.c~sparse-crypto_tea crypto/tea.c
@@ -31,8 +31,8 @@
 #define XTEA_ROUNDS		32
 #define XTEA_DELTA		0x9e3779b9
 
-#define u32_in(x) le32_to_cpu(*(const u32 *)(x))
-#define u32_out(to, from) (*(u32 *)(to) = cpu_to_le32(from))
+#define u32_in(x) le32_to_cpup((const __le32 *)(x))
+#define u32_out(to, from) (*(__le32 *)(to) = cpu_to_le32(from))
 
 struct tea_ctx {
 	u32 KEY[4];

_

#1 lore raw

---

 kj-domen/crypto/tea.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
crypto/tea.c renamed from crypto/tea.c~sparse-crypto_tea +2 -2
diff -puN crypto/tea.c~sparse-crypto_tea crypto/tea.c
@@ -31,8 +31,8 @@
 #define XTEA_ROUNDS		32
 #define XTEA_DELTA		0x9e3779b9
 
-#define u32_in(x) le32_to_cpu(*(const u32 *)(x))
-#define u32_out(to, from) (*(u32 *)(to) = cpu_to_le32(from))
+#define u32_in(x) le32_to_cpup((const __le32 *)(x))
+#define u32_out(to, from) (*(__le32 *)(to) = cpu_to_le32(from))
 
 struct tea_ctx {
 	u32 KEY[4];

_