lkml.org 
[lkml]   [2013]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH -v3 18/23] net/sched: rename random32() to prandom_u32()
    Date
    Use more preferable function name which implies using a pseudo-random
    number generator.

    Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
    Cc: Stephen Hemminger <shemminger@vyatta.com>
    Cc: Jamal Hadi Salim <jhs@mojatatu.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: netem@lists.linux-foundation.org
    Cc: netdev@vger.kernel.org
    Cc: netdev@vger.kernel.org
    ---

    No change from v2

    net/sched/sch_choke.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
    index cc37dd5..ef53ab8 100644
    --- a/net/sched/sch_choke.c
    +++ b/net/sched/sch_choke.c
    @@ -80,7 +80,7 @@ struct choke_sched_data {
    /* deliver a random number between 0 and N - 1 */
    static u32 random_N(unsigned int N)
    {
    - return reciprocal_divide(random32(), N);
    + return reciprocal_divide(prandom_u32(), N);
    }

    /* number of elements in queue including holes */
    --
    1.8.1.2


    \
     
     \ /
      Last update: 2013-03-04 15:01    [W:4.332 / U:0.140 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site