diff options
| author | Jason A. Donenfeld <[email protected]> | 2022-10-10 02:44:02 +0000 |
|---|---|---|
| committer | Jason A. Donenfeld <[email protected]> | 2022-11-18 01:15:15 +0000 |
| commit | 8032bf1233a74627ce69b803608e650f3f35971c (patch) | |
| tree | 1e15cd719358130192c59b8d5a61a0c3c9fbe82c /lib/find_bit_benchmark.c | |
| parent | random: add helpers for random numbers with given floor or range (diff) | |
| download | kernel-8032bf1233a74627ce69b803608e650f3f35971c.tar.gz kernel-8032bf1233a74627ce69b803608e650f3f35971c.zip | |
treewide: use get_random_u32_below() instead of deprecated function
This is a simple mechanical transformation done by:
@@
expression E;
@@
- prandom_u32_max
+ get_random_u32_below
(E)
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Darrick J. Wong <[email protected]> # for xfs
Reviewed-by: SeongJae Park <[email protected]> # for damon
Reviewed-by: Jason Gunthorpe <[email protected]> # for infiniband
Reviewed-by: Russell King (Oracle) <[email protected]> # for arm
Acked-by: Ulf Hansson <[email protected]> # for mmc
Signed-off-by: Jason A. Donenfeld <[email protected]>
Diffstat (limited to 'lib/find_bit_benchmark.c')
| -rw-r--r-- | lib/find_bit_benchmark.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/find_bit_benchmark.c b/lib/find_bit_benchmark.c index 7c3c011abd29..d3fb09e6eff1 100644 --- a/lib/find_bit_benchmark.c +++ b/lib/find_bit_benchmark.c @@ -174,8 +174,8 @@ static int __init find_bit_test(void) bitmap_zero(bitmap2, BITMAP_LEN); while (nbits--) { - __set_bit(prandom_u32_max(BITMAP_LEN), bitmap); - __set_bit(prandom_u32_max(BITMAP_LEN), bitmap2); + __set_bit(get_random_u32_below(BITMAP_LEN), bitmap); + __set_bit(get_random_u32_below(BITMAP_LEN), bitmap2); } test_find_next_bit(bitmap, BITMAP_LEN); |
