projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
treewide: use prandom_u32_max() when possible, part 1
[linux-block.git]
/
net
/
core
/
neighbour.c
diff --git
a/net/core/neighbour.c
b/net/core/neighbour.c
index e93edb81010363a4e41e248fd652d68f8ab958e4..3c4786b9990703814995832027af16d8c8e06c72 100644
(file)
--- a/
net/core/neighbour.c
+++ b/
net/core/neighbour.c
@@
-111,7
+111,7
@@
static void neigh_cleanup_and_release(struct neighbour *neigh)
unsigned long neigh_rand_reach_time(unsigned long base)
{
- return base ?
(prandom_u32() %
base) + (base >> 1) : 0;
+ return base ?
prandom_u32_max(
base) + (base >> 1) : 0;
}
EXPORT_SYMBOL(neigh_rand_reach_time);