[PATCH next 4/7] random32: Change prandom_seed_state() to be a real function

From: David Laight

Date: Mon Nov 02 2026 - 17:16:59 EST


There is no reason for it to be inlined.

Signed-off-by: David Laight <david.laight.linux@xxxxxxxxx>
---
include/linux/prandom.h | 10 +---------
lib/random32.c | 11 +++++++++++
2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/include/linux/prandom.h b/include/linux/prandom.h
index ff7dcc3fa105..d4627e62098c 100644
--- a/include/linux/prandom.h
+++ b/include/linux/prandom.h
@@ -37,14 +37,6 @@ static inline u32 __seed(u32 x, u32 m)
* @state: pointer to state structure to receive the seed.
* @seed: arbitrary 64-bit value to use as a seed.
*/
-static inline void prandom_seed_state(struct rnd_state *state, u64 seed)
-{
- u32 i = ((seed >> 32) ^ (seed << 10) ^ seed) & 0xffffffffUL;
-
- state->s1 = __seed(i, 2U);
- state->s2 = __seed(i, 8U);
- state->s3 = __seed(i, 16U);
- state->s4 = __seed(i, 128U);
-}
+void prandom_seed_state(struct rnd_state *state, u64 seed);

#endif
diff --git a/lib/random32.c b/lib/random32.c
index 53cb289a5db4..83776345adda 100644
--- a/lib/random32.c
+++ b/lib/random32.c
@@ -130,3 +130,14 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state)
}
}
EXPORT_SYMBOL(prandom_seed_full_state);
+
+void prandom_seed_state(struct rnd_state *state, u64 seed)
+{
+ u32 i = ((seed >> 32) ^ (seed << 10) ^ seed) & 0xffffffffUL;
+
+ state->s1 = __seed(i, 2U);
+ state->s2 = __seed(i, 8U);
+ state->s3 = __seed(i, 16U);
+ state->s4 = __seed(i, 128U);
+}
+EXPORT_SYMBOL(prandom_seed_state);
--
2.39.5