Skip to content
  • Jason A. Donenfeld's avatar
    random: convert get_random_int/long into get_random_u32/u64 · c440408c
    Jason A. Donenfeld authored
    
    
    Many times, when a user wants a random number, he wants a random number
    of a guaranteed size. So, thinking of get_random_int and get_random_long
    in terms of get_random_u32 and get_random_u64 makes it much easier to
    achieve this. It also makes the code simpler.
    
    On 32-bit platforms, get_random_int and get_random_long are both aliased
    to get_random_u32. On 64-bit platforms, int->u32 and long->u64.
    
    Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Theodore Ts'o <tytso@mit.edu>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    c440408c