diff mbox series

[v2,3/3] prandom: remove next_pseudo_random32

Message ID 20250211063332.16542-4-theil.markus@gmail.com (mailing list archive)
State New
Headers show
Series [v2,1/3] drm/i915/selftests: use prandom in selftest | expand

Commit Message

Markus Theil Feb. 11, 2025, 6:33 a.m. UTC
next_pseudo_random32 implements a LCG with known bad statistical
properties and was only used in two pieces of testing code.

After the users are converted to prandom as part of this series,
remove the LCG here.

This removes another option of using an insecure PRNG.

Signed-off-by: Markus Theil <theil.markus@gmail.com>
---
 include/linux/prandom.h | 6 ------
 1 file changed, 6 deletions(-)
diff mbox series

Patch

diff --git a/include/linux/prandom.h b/include/linux/prandom.h
index f2ed5b72b3d6..ff7dcc3fa105 100644
--- a/include/linux/prandom.h
+++ b/include/linux/prandom.h
@@ -47,10 +47,4 @@  static inline void prandom_seed_state(struct rnd_state *state, u64 seed)
 	state->s4 = __seed(i, 128U);
 }
 
-/* Pseudo random number generator from numerical recipes. */
-static inline u32 next_pseudo_random32(u32 seed)
-{
-	return seed * 1664525 + 1013904223;
-}
-
 #endif