Commit 6d65df33 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

kernel/: 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>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d3d30417
...@@ -1319,7 +1319,7 @@ static int rcu_gp_init(struct rcu_state *rsp) ...@@ -1319,7 +1319,7 @@ static int rcu_gp_init(struct rcu_state *rsp)
rnp->grphi, rnp->qsmask); rnp->grphi, rnp->qsmask);
raw_spin_unlock_irq(&rnp->lock); raw_spin_unlock_irq(&rnp->lock);
#ifdef CONFIG_PROVE_RCU_DELAY #ifdef CONFIG_PROVE_RCU_DELAY
if ((random32() % (rcu_num_nodes * 8)) == 0) if ((prandom_u32() % (rcu_num_nodes * 8)) == 0)
schedule_timeout_uninterruptible(2); schedule_timeout_uninterruptible(2);
#endif /* #ifdef CONFIG_PROVE_RCU_DELAY */ #endif /* #ifdef CONFIG_PROVE_RCU_DELAY */
cond_resched(); cond_resched();
......
...@@ -365,7 +365,7 @@ int init_test_probes(void) ...@@ -365,7 +365,7 @@ int init_test_probes(void)
target2 = kprobe_target2; target2 = kprobe_target2;
do { do {
rand1 = random32(); rand1 = prandom_u32();
} while (rand1 <= div_factor); } while (rand1 <= div_factor);
printk(KERN_INFO "Kprobe smoke test started\n"); printk(KERN_INFO "Kprobe smoke test started\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment