Merge tag 'devicetree-fixes-for-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-block.git] / lib / test_list_sort.c
index ade7a1ea0c8e25006af3772f91b793602aa4d605..19ff229b9c3a7838a9a216e71bd9fe866c53da2f 100644 (file)
@@ -71,7 +71,7 @@ static void list_sort_test(struct kunit *test)
                KUNIT_ASSERT_NOT_ERR_OR_NULL(test, el);
 
                 /* force some equivalencies */
-               el->value = prandom_u32() % (TEST_LIST_LEN / 3);
+               el->value = prandom_u32_max(TEST_LIST_LEN / 3);
                el->serial = i;
                el->poison1 = TEST_POISON1;
                el->poison2 = TEST_POISON2;