summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2014-08-26 09:32:24 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2014-08-26 15:33:28 +0800
commit79964f3cea81c4a4af666e42be945273a83c55d9 (patch)
tree0cfe46c0d63b244091b5fb97bea39953a4301ecf /crypto
parentf5af726d847fe48c4b48b4959b1cbf2e7b5b4ba8 (diff)
downloadlinux-crypto-79964f3cea81c4a4af666e42be945273a83c55d9.tar.gz
linux-crypto-79964f3cea81c4a4af666e42be945273a83c55d9.zip
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c
index 9fd239fe..39ed9183 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -277,7 +277,7 @@ static bool drbg_fips_continuous_test(struct drbg_state *drbg,
static inline void drbg_cpu_to_be32(__u32 val, unsigned char *buf)
{
struct s {
- __u32 conv;
+ __be32 conv;
};
struct s *conversion = (struct s *) buf;
@@ -989,7 +989,7 @@ static int drbg_hash_generate(struct drbg_state *drbg,
int ret = 0;
union {
unsigned char req[8];
- __u64 req_int;
+ __be64 req_int;
} u;
unsigned char prefix = DRBG_PREFIX3;
struct drbg_string data1, data2;