lkml.org 
[lkml]   [2013]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH -v2 25/26] net: rename random32 to prandom
    Date
    Commit 496f2f93b1cc286f5a4f4f9acdc1e5314978683f ("random32: rename
    random32 to prandom") renamed random32() and srandom32() to prandom_u32()
    and prandom_seed() respectively.

    net_random() and net_srandom() need to be redefined with prandom_* in
    order to finish the naming transition.

    While I'm at it, enclose macro argument of net_srandom() with parenthesis.

    Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: netdev@vger.kernel.org
    ---

    * New patch from v2

    include/linux/net.h | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/include/linux/net.h b/include/linux/net.h
    index aa16731..99c9f0c 100644
    --- a/include/linux/net.h
    +++ b/include/linux/net.h
    @@ -240,8 +240,8 @@ do { \
    #define net_dbg_ratelimited(fmt, ...) \
    net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__)

    -#define net_random() random32()
    -#define net_srandom(seed) srandom32((__force u32)seed)
    +#define net_random() prandom_u32()
    +#define net_srandom(seed) prandom_seed((__force u32)(seed))

    extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg,
    struct kvec *vec, size_t num, size_t len);
    --
    1.7.11.7


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