]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
lib/: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 20 Mar 2013 04:08:45 +0000 (15:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Mar 2013 04:23:33 +0000 (15:23 +1100)
Use preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/fault-inject.c
lib/list_sort.c

index f7210ad6cffd44c2486f8fef542dc5fa5affdae3..c5c7a762b850a30f23ad28e5a0f3a1f2e17e32be 100644 (file)
@@ -122,7 +122,7 @@ bool should_fail(struct fault_attr *attr, ssize_t size)
                        return false;
        }
 
-       if (attr->probability <= random32() % 100)
+       if (attr->probability <= prandom_u32() % 100)
                return false;
 
        if (!fail_stacktrace(attr))
index d7325c6b103f0be078ff3672c35c468ed35738f1..1183fa70a44d26cfc673b6d5d2f645b7026f50dd 100644 (file)
@@ -229,7 +229,7 @@ static int __init list_sort_test(void)
                        goto exit;
                }
                 /* force some equivalencies */
-               el->value = random32() % (TEST_LIST_LEN/3);
+               el->value = prandom_u32() % (TEST_LIST_LEN / 3);
                el->serial = i;
                el->poison1 = TEST_POISON1;
                el->poison2 = TEST_POISON2;