aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/random.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/random.h b/include/linux/random.h
index 8ef0b70bd1f9..4002b3df4c85 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -32,10 +32,10 @@ void prandom_seed(u32 seed);
32void prandom_reseed_late(void); 32void prandom_reseed_late(void);
33 33
34struct rnd_state { 34struct rnd_state {
35 __u32 s1, s2, s3; 35 __u32 s1, s2, s3, s4;
36}; 36};
37 37
38u32 prandom_u32_state(struct rnd_state *); 38u32 prandom_u32_state(struct rnd_state *state);
39void prandom_bytes_state(struct rnd_state *state, void *buf, int nbytes); 39void prandom_bytes_state(struct rnd_state *state, void *buf, int nbytes);
40 40
41/* 41/*
@@ -55,9 +55,10 @@ static inline void prandom_seed_state(struct rnd_state *state, u64 seed)
55{ 55{
56 u32 i = (seed >> 32) ^ (seed << 10) ^ seed; 56 u32 i = (seed >> 32) ^ (seed << 10) ^ seed;
57 57
58 state->s1 = __seed(i, 2); 58 state->s1 = __seed(i, 2U);
59 state->s2 = __seed(i, 8); 59 state->s2 = __seed(i, 8U);
60 state->s3 = __seed(i, 16); 60 state->s3 = __seed(i, 16U);
61 state->s4 = __seed(i, 128U);
61} 62}
62 63
63#ifdef CONFIG_ARCH_RANDOM 64#ifdef CONFIG_ARCH_RANDOM