mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
locking,arch: Use ACCESS_ONCE() instead of cast to volatile in atomic_read()
Use the much more reader friendly ACCESS_ONCE() instead of the cast to volatile. This is purely a stylistic change. Signed-off-by: Pranith Kumar <[email protected]> Acked-by: Jesper Nilsson <[email protected]> Acked-by: Hans-Christian Egtvedt <[email protected]> Acked-by: Max Filippov <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
da4c54457e
commit
2291059c85
18 changed files with 24 additions and 24 deletions
|
|
@ -126,7 +126,7 @@ ATOMIC_OP(or, |)
|
|||
* Atomically reads the value of @v.
|
||||
*/
|
||||
#ifndef atomic_read
|
||||
#define atomic_read(v) (*(volatile int *)&(v)->counter)
|
||||
#define atomic_read(v) ACCESS_ONCE((v)->counter)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue