From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
drbd-dev@lists.linbit.com, Jens Axboe <axboe@kernel.dk>
Subject: [PATCH -v3 08/23] drbd: rename random32() to prandom_u32()
Date: Mon, 4 Mar 2013 21:58:16 +0900 [thread overview]
Message-ID: <1362401911-14074-9-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>
Cc: drbd-dev@lists.linbit.com
Cc: Jens Axboe <axboe@kernel.dk>
---
No change from v2
drivers/block/drbd/drbd_receiver.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index a9eccfc..83c5ae0 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -757,7 +757,8 @@ static struct socket *drbd_wait_for_connect(struct drbd_tconn *tconn, struct acc
rcu_read_unlock();
timeo = connect_int * HZ;
- timeo += (random32() & 1) ? timeo / 7 : -timeo / 7; /* 28.5% random jitter */
+ /* 28.5% random jitter */
+ timeo += (prandom_u32() & 1) ? timeo / 7 : -timeo / 7;
err = wait_for_completion_interruptible_timeout(&ad->door_bell, timeo);
if (err <= 0)
@@ -953,7 +954,7 @@ retry:
conn_warn(tconn, "Error receiving initial packet\n");
sock_release(s);
randomize:
- if (random32() & 1)
+ if (prandom_u32() & 1)
goto retry;
}
}
--
1.8.1.2
next prev parent reply other threads:[~2013-03-04 12:59 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 ` [PATCH -v3 07/23] kernel/: " Akinobu Mita
2013-03-04 12:58 ` Akinobu Mita [this message]
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-9-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=drbd-dev@lists.linbit.com \
--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