Skip to content

Commit

Permalink
kernel/: rename random32() to prandom_u32()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Apr 30, 2013
1 parent d3d3041 commit 6d65df3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion kernel/test_kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 6d65df3

Please sign in to comment.