LoongArch: mm: Fix huge page entry update for virtual machine
[platform/kernel/linux-starfive.git] / lib / test_list_sort.c
index ade7a1e..19ff229 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;