Skip to content

Commit

Permalink
crypto: drbg - fix sparse warning for cpu_to_be[32|64]
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Stephan Mueller <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
smuellerDD authored and herbertx committed Aug 26, 2014
1 parent 4c1948f commit 7c8ae03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7c8ae03

Please sign in to comment.