diff options
author | Stephan Mueller <smueller@chronox.de> | 2014-08-26 03:32:24 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-08-26 03:33:28 -0400 |
commit | 7c8ae03f41e635813b777a0989d8ac1ff5a8494e (patch) | |
tree | 08c94cc9f56b544d15f027c4accb572621417a91 /crypto | |
parent | 4c1948fc471d444b15dfaca73ea0c9b77c2d5505 (diff) |
crypto: drbg - fix sparse warning for cpu_to_be[32|64]
The sparse tool complained that the cpu_to_be[32|64] functions return
__be[32|64] instead of __u32 or __u64. The patch replaces the __u32 and
__u64 with __be32 and __be64.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/drbg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c index 9fd239fea963..39ed9183d30f 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c | |||
@@ -277,7 +277,7 @@ static bool drbg_fips_continuous_test(struct drbg_state *drbg, | |||
277 | static inline void drbg_cpu_to_be32(__u32 val, unsigned char *buf) | 277 | static inline void drbg_cpu_to_be32(__u32 val, unsigned char *buf) |
278 | { | 278 | { |
279 | struct s { | 279 | struct s { |
280 | __u32 conv; | 280 | __be32 conv; |
281 | }; | 281 | }; |
282 | struct s *conversion = (struct s *) buf; | 282 | struct s *conversion = (struct s *) buf; |
283 | 283 | ||
@@ -989,7 +989,7 @@ static int drbg_hash_generate(struct drbg_state *drbg, | |||
989 | int ret = 0; | 989 | int ret = 0; |
990 | union { | 990 | union { |
991 | unsigned char req[8]; | 991 | unsigned char req[8]; |
992 | __u64 req_int; | 992 | __be64 req_int; |
993 | } u; | 993 | } u; |
994 | unsigned char prefix = DRBG_PREFIX3; | 994 | unsigned char prefix = DRBG_PREFIX3; |
995 | struct drbg_string data1, data2; | 995 | struct drbg_string data1, data2; |