From: Domen Puncer Date: Sat, 25 Jun 2005 21:58:58 +0000 (-0700) Subject: [PATCH] lib/sha1.c: fix sparse warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=23712b2fbf6b845289c1d41d929be0931fab2759;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] lib/sha1.c: fix sparse warning lib/sha1.c:44:10: warning: cast to restricted type Signed-off-by: Alexey Dobriyan Signed-off-by: Domen Puncer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/sha1.c b/lib/sha1.c index 2f7f1148dfde..1cdabe3065f9 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -41,7 +41,7 @@ void sha_transform(__u32 *digest, const char *in, __u32 *W) __u32 a, b, c, d, e, t, i; for (i = 0; i < 16; i++) - W[i] = be32_to_cpu(((const __u32 *)in)[i]); + W[i] = be32_to_cpu(((const __be32 *)in)[i]); for (i = 0; i < 64; i++) W[i+16] = rol32(W[i+13] ^ W[i+8] ^ W[i+2] ^ W[i], 1);