aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2013-04-29 19:21:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:42 -0400
commit56a1ba5fd1802c059d08d72d09c1fec6e02e2c35 (patch)
treeec498d4f545888cd682afe53ba78f20228a5269b /arch/x86/mm
parent4a7b4d2360175f67ab2c58effeeb8362a3057c25 (diff)
x86: rename random32() to prandom_u32()
Use preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/pageattr-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
index 5a9e856f6e2d..d0b1773d9d2e 100644
--- a/arch/x86/mm/pageattr-test.c
+++ b/arch/x86/mm/pageattr-test.c
@@ -132,10 +132,10 @@ static int pageattr_test(void)
132 failed += print_split(&sa); 132 failed += print_split(&sa);
133 133
134 for (i = 0; i < NTEST; i++) { 134 for (i = 0; i < NTEST; i++) {
135 unsigned long pfn = random32() % max_pfn_mapped; 135 unsigned long pfn = prandom_u32() % max_pfn_mapped;
136 136
137 addr[i] = (unsigned long)__va(pfn << PAGE_SHIFT); 137 addr[i] = (unsigned long)__va(pfn << PAGE_SHIFT);
138 len[i] = random32() % 100; 138 len[i] = prandom_u32() % 100;
139 len[i] = min_t(unsigned long, len[i], max_pfn_mapped - pfn - 1); 139 len[i] = min_t(unsigned long, len[i], max_pfn_mapped - pfn - 1);
140 140
141 if (len[i] == 0) 141 if (len[i] == 0)