projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lguest: rename random32() to prandom_u32()
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
lguest
/
page_tables.c
diff --git
a/drivers/lguest/page_tables.c
b/drivers/lguest/page_tables.c
index 3b62be160a6ebca5b11f9f4a0126268386b32580..864baabaee2549cf51821b7fe8c41611e7ae35d0 100644
(file)
--- a/
drivers/lguest/page_tables.c
+++ b/
drivers/lguest/page_tables.c
@@
-686,7
+686,7
@@
static unsigned int new_pgdir(struct lg_cpu *cpu,
* We pick one entry at random to throw out. Choosing the Least
* Recently Used might be better, but this is easy.
*/
* We pick one entry at random to throw out. Choosing the Least
* Recently Used might be better, but this is easy.
*/
- next =
random
32() % ARRAY_SIZE(cpu->lg->pgdirs);
+ next =
prandom_u
32() % ARRAY_SIZE(cpu->lg->pgdirs);
/* If it's never been allocated at all before, try now. */
if (!cpu->lg->pgdirs[next].pgdir) {
cpu->lg->pgdirs[next].pgdir =
/* If it's never been allocated at all before, try now. */
if (!cpu->lg->pgdirs[next].pgdir) {
cpu->lg->pgdirs[next].pgdir =