aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2021-06-29 09:51:58 +0200
committerPetr Mladek <pmladek@suse.com>2021-06-29 09:51:58 +0200
commitd8c032145fccfead0c3f733e7b6aaa4e81f9d326 (patch)
tree7b150b83d4341c8bc646f33a7b0cb928dab4ee8a /include
parentMerge branch 'for-5.14-vsprintf-pts' into for-linus (diff)
parentrandom32: Fix implicit truncation warning in prandom_seed_state() (diff)
Merge branch 'for-5.14-vsprintf-scanf' into for-linus
Diffstat (limited to 'include')
-rw-r--r--include/linux/prandom.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/prandom.h b/include/linux/prandom.h
index bbf4b4ad61df..056d31317e49 100644
--- a/include/linux/prandom.h
+++ b/include/linux/prandom.h
@@ -111,7 +111,7 @@ static inline u32 __seed(u32 x, u32 m)
*/
static inline void prandom_seed_state(struct rnd_state *state, u64 seed)
{
- u32 i = (seed >> 32) ^ (seed << 10) ^ seed;
+ u32 i = ((seed >> 32) ^ (seed << 10) ^ seed) & 0xffffffffUL;
state->s1 = __seed(i, 2U);
state->s2 = __seed(i, 8U);