Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10fdc141 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

lguest: rename random32() to prandom_u32()



Use preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 78782023
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -686,7 +686,7 @@ static unsigned int new_pgdir(struct lg_cpu *cpu,
	 * We pick one entry at random to throw out.  Choosing the Least
	 * Recently Used might be better, but this is easy.
	 */
	next = random32() % ARRAY_SIZE(cpu->lg->pgdirs);
	next = prandom_u32() % ARRAY_SIZE(cpu->lg->pgdirs);
	/* If it's never been allocated at all before, try now. */
	if (!cpu->lg->pgdirs[next].pgdir) {
		cpu->lg->pgdirs[next].pgdir =