Skip to content

Commit

Permalink
x86: rename random32() to prandom_u32()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Apr 30, 2013
1 parent 4a7b4d2 commit 56a1ba5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/mm/pageattr-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ static int pageattr_test(void)
failed += print_split(&sa);

for (i = 0; i < NTEST; i++) {
unsigned long pfn = random32() % max_pfn_mapped;
unsigned long pfn = prandom_u32() % max_pfn_mapped;

addr[i] = (unsigned long)__va(pfn << PAGE_SHIFT);
len[i] = random32() % 100;
len[i] = prandom_u32() % 100;
len[i] = min_t(unsigned long, len[i], max_pfn_mapped - pfn - 1);

if (len[i] == 0)
Expand Down

0 comments on commit 56a1ba5

Please sign in to comment.