kernel/: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 29 Apr 2013 23:21:30 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:42 +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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/rcutree.c
kernel/test_kprobes.c

index 5b8ad827fd86e74932a0b42b40c8f5c27e370228..2f8530bc4b1778ecbbd4221b668cb933c2cbad96 100644 (file)
@@ -1319,7 +1319,7 @@ static int rcu_gp_init(struct rcu_state *rsp)
                                            rnp->grphi, rnp->qsmask);
                raw_spin_unlock_irq(&rnp->lock);
 #ifdef CONFIG_PROVE_RCU_DELAY
-               if ((random32() % (rcu_num_nodes * 8)) == 0)
+               if ((prandom_u32() % (rcu_num_nodes * 8)) == 0)
                        schedule_timeout_uninterruptible(2);
 #endif /* #ifdef CONFIG_PROVE_RCU_DELAY */
                cond_resched();
index f8b11a283171b65849c5ed3bc0e162397f76fbea..12d6ebbfdd836809d41fafbd55f1ddac369809a8 100644 (file)
@@ -365,7 +365,7 @@ int init_test_probes(void)
        target2 = kprobe_target2;
 
        do {
-               rand1 = random32();
+               rand1 = prandom_u32();
        } while (rand1 <= div_factor);
 
        printk(KERN_INFO "Kprobe smoke test started\n");