path: root/arch/cris/include/asm
diff options
authorPranith Kumar <>2014-09-23 10:29:50 -0400
committerIngo Molnar <>2014-10-03 06:06:23 +0200
commit2291059c852706c6f5ffb400366042b7625066cd (patch)
tree7827b5e7992bc0d3533d5832773c6be2f4221782 /arch/cris/include/asm
parentda4c54457e6d8262423aded4bcbccc4103049506 (diff)
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 <> Acked-by: Jesper Nilsson <> Acked-by: Hans-Christian Egtvedt <> Acked-by: Max Filippov <> Signed-off-by: Peter Zijlstra (Intel) <> Cc: Linus Torvalds <> Cc: Link: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'arch/cris/include/asm')
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/cris/include/asm/atomic.h b/arch/cris/include/asm/atomic.h
index 0033f9dfea24..279766a70664 100644
--- a/arch/cris/include/asm/atomic.h
+++ b/arch/cris/include/asm/atomic.h
@@ -17,7 +17,7 @@
#define ATOMIC_INIT(i) { (i) }
-#define atomic_read(v) (*(volatile int *)&(v)->counter)
+#define atomic_read(v) ACCESS_ONCE((v)->counter)
#define atomic_set(v,i) (((v)->counter) = (i))
/* These should be written in asm but we do it in C for now. */