diff options
author | Aruna-Hewapathirane <aruna.hewapathirane@gmail.com> | 2014-01-11 07:15:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-14 18:15:25 -0500 |
commit | 63862b5bef7349dd1137e4c70702c67d77565785 (patch) | |
tree | ad50ec4a9d67fd025a29093dc5a4b493fe02e8a5 /net/ipv6/addrconf.c | |
parent | 825edac4e78ded9e621c167a4f47a2392bd9e082 (diff) |
net: replace macros net_random and net_srandom with direct calls to prandom
This patch removes the net_random and net_srandom macros and replaces
them with direct calls to the prandom ones. As new commits only seem to
use prandom_u32 there is no use to keep them around.
This change makes it easier to grep for users of prandom_u32.
Signed-off-by: Aruna-Hewapathirane <aruna.hewapathirane@gmail.com>
Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index b0cd122e5fb4..5329cccf55dc 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3104,7 +3104,7 @@ static void addrconf_dad_kick(struct inet6_ifaddr *ifp) | |||
3104 | if (ifp->flags & IFA_F_OPTIMISTIC) | 3104 | if (ifp->flags & IFA_F_OPTIMISTIC) |
3105 | rand_num = 0; | 3105 | rand_num = 0; |
3106 | else | 3106 | else |
3107 | rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1); | 3107 | rand_num = prandom_u32() % (idev->cnf.rtr_solicit_delay ? : 1); |
3108 | 3108 | ||
3109 | ifp->dad_probes = idev->cnf.dad_transmits; | 3109 | ifp->dad_probes = idev->cnf.dad_transmits; |
3110 | addrconf_mod_dad_timer(ifp, rand_num); | 3110 | addrconf_mod_dad_timer(ifp, rand_num); |
@@ -3117,7 +3117,7 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp) | |||
3117 | 3117 | ||
3118 | addrconf_join_solict(dev, &ifp->addr); | 3118 | addrconf_join_solict(dev, &ifp->addr); |
3119 | 3119 | ||
3120 | net_srandom(ifp->addr.s6_addr32[3]); | 3120 | prandom_seed((__force u32) ifp->addr.s6_addr32[3]); |
3121 | 3121 | ||
3122 | read_lock_bh(&idev->lock); | 3122 | read_lock_bh(&idev->lock); |
3123 | spin_lock(&ifp->lock); | 3123 | spin_lock(&ifp->lock); |