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:
b761fe2
)
lib: clean up put_cpu_var usage
author
Shaohua Li
<
[email protected]
>
Tue, 27 Sep 2016 15:42:42 +0000
(08:42 -0700)
committer
David S. Miller
<
[email protected]
>
Wed, 28 Sep 2016 02:09:17 +0000
(22:09 -0400)
put_cpu_var takes the percpu data, not the data returned from
get_cpu_var.
This doesn't change the behavior.
Cc: Tejun Heo <
[email protected]
>
Signed-off-by: Shaohua Li <
[email protected]
>
Acked-by: Tejun Heo <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
lib/random32.c
patch
|
blob
|
history
diff --git
a/lib/random32.c
b/lib/random32.c
index 69ed593aab07315d90c4b2dc2e2fcbb9931211fd..915982b304bbb16a9d7924b3c1957857189ab6ba 100644
(file)
--- a/
lib/random32.c
+++ b/
lib/random32.c
@@
-81,7
+81,7
@@
u32 prandom_u32(void)
u32 res;
res = prandom_u32_state(state);
- put_cpu_var(state);
+ put_cpu_var(
net_rand_
state);
return res;
}
@@
-128,7
+128,7
@@
void prandom_bytes(void *buf, size_t bytes)
struct rnd_state *state = &get_cpu_var(net_rand_state);
prandom_bytes_state(state, buf, bytes);
- put_cpu_var(state);
+ put_cpu_var(
net_rand_
state);
}
EXPORT_SYMBOL(prandom_bytes);