projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d65df3
)
drbd: rename random32() to prandom_u32()
author
Akinobu Mita
<
[email protected]
>
Mon, 29 Apr 2013 23:21:31 +0000
(16:21 -0700)
committer
Linus Torvalds
<
[email protected]
>
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 <
[email protected]
>
Cc: Jens Axboe <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/block/drbd/drbd_receiver.c
patch
|
blob
|
history
diff --git
a/drivers/block/drbd/drbd_receiver.c
b/drivers/block/drbd/drbd_receiver.c
index a9eccfc6079b02e6fb2f9838a1728b76c9599582..83c5ae0ed56b4f1f41c7a655ad756e6f64766c26 100644
(file)
--- 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 (
random
32() & 1)
+ if (
prandom_u
32() & 1)
goto retry;
}
}