public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Subject: [PATCH -v3 07/23] kernel/: rename random32() to prandom_u32()
Date: Mon,  4 Mar 2013 21:58:15 +0900	[thread overview]
Message-ID: <1362401911-14074-8-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1362401911-14074-1-git-send-email-akinobu.mita@gmail.com>

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

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---

No change from v2

 kernel/rcutree.c      | 2 +-
 kernel/test_kprobes.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 5b8ad82..2f8530b 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -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();
diff --git a/kernel/test_kprobes.c b/kernel/test_kprobes.c
index f8b11a2..12d6ebb 100644
--- a/kernel/test_kprobes.c
+++ b/kernel/test_kprobes.c
@@ -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");
-- 
1.8.1.2


  parent reply	other threads:[~2013-03-04 13:04 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04 12:58 [PATCH -v3 00/23] rename random32 to prandom Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 01/23] raid6test: use prandom_bytes() Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 02/23] uuid: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 03/23] x86: pageattr-test: remove srandom32 call Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 04/23] x86: rename random32() to prandom_u32() Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 05/23] lib/: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 06/23] mm/: " Akinobu Mita
2013-03-04 12:58 ` Akinobu Mita [this message]
2013-03-04 12:58 ` [PATCH -v3 08/23] drbd: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 09/23] infiniband: " Akinobu Mita
2013-03-04 15:41   ` Steve Wise
2013-03-04 12:58 ` [PATCH -v3 10/23] mmc: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 11/23] video/uvesafb: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 12/23] xfs: " Akinobu Mita
2013-03-07 18:48   ` Ben Myers
2013-03-04 12:58 ` [PATCH -v3 13/23] uwb: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 14/23] lguest: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 15/23] scsi: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 16/23] drivers/net: " Akinobu Mita
2013-03-04 13:37   ` Arend van Spriel
2013-03-04 21:53     ` Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 17/23] net/sunrpc: " Akinobu Mita
2013-03-04 22:44   ` Myklebust, Trond
2013-03-04 12:58 ` [PATCH -v3 18/23] net/sched: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 19/23] net/netfilter: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 20/23] net/core: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 21/23] net/core: remove duplicate statements by do-while loop Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 22/23] net: rename random32 to prandom Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 23/23] remove unused random32() and srandom32() Akinobu Mita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362401911-14074-8-git-send-email-akinobu.mita@gmail.com \
    --to=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox