projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7878202
)
lguest: rename random32() to prandom_u32()
author
Akinobu Mita
<
[email protected]
>
Mon, 29 Apr 2013 23:21:34 +0000
(16:21 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 30 Apr 2013 01:28:43 +0000
(18:28 -0700)
Use preferable function name which implies using a pseudo-random
number generator.
Signed-off-by: Akinobu Mita <
[email protected]
>
Acked-by: Rusty Russell <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/lguest/page_tables.c
patch
|
blob
|
history
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.
*/
- 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 =