lguest: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 29 Apr 2013 23:21:34 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:43 +0000 (18:28 -0700)
Use preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/lguest/page_tables.c

index 3b62be160a6ebca5b11f9f4a0126268386b32580..864baabaee2549cf51821b7fe8c41611e7ae35d0 100644 (file)
@@ -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 =