* [patch 1/4] crypto/sha256.c: fix sparse warnings
@ 2005-03-19 13:18 domen
2005-03-20 7:32 ` Herbert Xu
2005-03-20 11:19 ` [patch 1/4 with proper signed-off] " Domen Puncer
0 siblings, 2 replies; 5+ messages in thread
From: domen @ 2005-03-19 13:18 UTC (permalink / raw)
To: herbert; +Cc: davem, linux-kernel, domen, adobriyan
Signed-off-by: Domen Puncer <domen@coderock.org>
---
kj-domen/crypto/sha256.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN crypto/sha256.c~sparse-crypto_sha256 crypto/sha256.c
--- kj/crypto/sha256.c~sparse-crypto_sha256 2005-03-18 20:05:34.000000000 +0100
+++ kj-domen/crypto/sha256.c 2005-03-18 20:05:34.000000000 +0100
@@ -58,7 +58,7 @@ static inline u32 Maj(u32 x, u32 y, u32
static inline void LOAD_OP(int I, u32 *W, const u8 *input)
{
- W[I] = __be32_to_cpu( ((u32*)(input))[I] );
+ W[I] = __be32_to_cpu( ((__be32*)(input))[I] );
}
static inline void BLEND_OP(int I, u32 *W)
_
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/4] crypto/sha256.c: fix sparse warnings
2005-03-19 13:18 [patch 1/4] crypto/sha256.c: fix sparse warnings domen
@ 2005-03-20 7:32 ` Herbert Xu
2005-03-20 8:10 ` Alexey Dobriyan
2005-03-20 11:19 ` [patch 1/4 with proper signed-off] " Domen Puncer
1 sibling, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2005-03-20 7:32 UTC (permalink / raw)
To: domen; +Cc: herbert, davem, linux-kernel, domen, adobriyan
domen@coderock.org wrote:
>
> diff -puN crypto/sha256.c~sparse-crypto_sha256 crypto/sha256.c
> --- kj/crypto/sha256.c~sparse-crypto_sha256 2005-03-18 20:05:34.000000000 +0100
> +++ kj-domen/crypto/sha256.c 2005-03-18 20:05:34.000000000 +0100
> @@ -58,7 +58,7 @@ static inline u32 Maj(u32 x, u32 y, u32
>
> static inline void LOAD_OP(int I, u32 *W, const u8 *input)
> {
> - W[I] = __be32_to_cpu( ((u32*)(input))[I] );
> + W[I] = __be32_to_cpu( ((__be32*)(input))[I] );
I don't get any warnings here (sparse version dated 12/03/2005).
What warnings are you getting exactly?
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/4] crypto/sha256.c: fix sparse warnings
2005-03-20 7:32 ` Herbert Xu
@ 2005-03-20 8:10 ` Alexey Dobriyan
2005-03-20 9:39 ` Herbert Xu
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Dobriyan @ 2005-03-20 8:10 UTC (permalink / raw)
To: Herbert Xu; +Cc: domen, davem, linux-kernel
On Sunday 20 March 2005 10:32, Herbert Xu wrote:
> domen@coderock.org wrote:
> > +++ kj-domen/crypto/sha256.c
> > static inline void LOAD_OP(int I, u32 *W, const u8 *input)
> > {
> > - W[I] = __be32_to_cpu( ((u32*)(input))[I] );
> > + W[I] = __be32_to_cpu( ((__be32*)(input))[I] );
>
> I don't get any warnings here (sparse version dated 12/03/2005).
> What warnings are you getting exactly?
crypto/sha256.c:61:9: warning: cast to restricted type
Use CHECK="sparse -Wbitwise" to see it.
Alexey
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/4] crypto/sha256.c: fix sparse warnings
2005-03-20 8:10 ` Alexey Dobriyan
@ 2005-03-20 9:39 ` Herbert Xu
0 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2005-03-20 9:39 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: herbert, domen, davem, linux-kernel
Alexey Dobriyan <adobriyan@mail.ru> wrote:
>
> crypto/sha256.c:61:9: warning: cast to restricted type
>
> Use CHECK="sparse -Wbitwise" to see it.
Thanks. I've applied all four patches to crypto. I changed patch 4/4
slightly so that it reads
+#define u32_in(x) le32_to_cpu(*(const __le32 *)(x))
instead of le32_to_cpup(...) for the sake of minimising the changes.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/4 with proper signed-off] crypto/sha256.c: fix sparse warnings
2005-03-19 13:18 [patch 1/4] crypto/sha256.c: fix sparse warnings domen
2005-03-20 7:32 ` Herbert Xu
@ 2005-03-20 11:19 ` Domen Puncer
1 sibling, 0 replies; 5+ messages in thread
From: Domen Puncer @ 2005-03-20 11:19 UTC (permalink / raw)
To: herbert; +Cc: davem, linux-kernel, adobriyan
Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
kj-domen/crypto/sha256.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN crypto/sha256.c~sparse-crypto_sha256 crypto/sha256.c
--- kj/crypto/sha256.c~sparse-crypto_sha256 2005-03-20 12:11:33.000000000 +0100
+++ kj-domen/crypto/sha256.c 2005-03-20 12:11:33.000000000 +0100
@@ -58,7 +58,7 @@ static inline u32 Maj(u32 x, u32 y, u32
static inline void LOAD_OP(int I, u32 *W, const u8 *input)
{
- W[I] = __be32_to_cpu( ((u32*)(input))[I] );
+ W[I] = __be32_to_cpu( ((__be32*)(input))[I] );
}
static inline void BLEND_OP(int I, u32 *W)
_
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-20 11:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-19 13:18 [patch 1/4] crypto/sha256.c: fix sparse warnings domen
2005-03-20 7:32 ` Herbert Xu
2005-03-20 8:10 ` Alexey Dobriyan
2005-03-20 9:39 ` Herbert Xu
2005-03-20 11:19 ` [patch 1/4 with proper signed-off] " Domen Puncer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox