[xen staging] Arm/atomic: cosmetics

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging] Arm/atomic: cosmetics

patchbot
commit 2455983ac4c03dae33b330c98e38e447478416d6
Author:     Jan Beulich <[hidden email]>
AuthorDate: Thu Mar 14 16:40:12 2019 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Thu Mar 14 16:40:12 2019 +0100

    Arm/atomic: cosmetics
   
    Drop redundant casts. Un-define no longer needed macros after use.
   
    Signed-off-by: Jan Beulich <[hidden email]>
    Reviewed-by: Julien Grall <[hidden email]>
---
 xen/include/asm-arm/atomic.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
index 0a136590fe..e81bf80e30 100644
--- a/xen/include/asm-arm/atomic.h
+++ b/xen/include/asm-arm/atomic.h
@@ -11,7 +11,7 @@ static inline type name(const volatile type *addr) \
     type ret;                                      \
     asm volatile("ldr" size " %" width(0) ",%1"    \
                  : "=r" (ret)                      \
-                 : "m" (*(volatile type *)addr));  \
+                 : "m" (*addr));                   \
     return ret;                                    \
 }
 
@@ -19,7 +19,7 @@ static inline type name(const volatile type *addr) \
 static inline void name(volatile type *addr, type val) \
 {                                                      \
     asm volatile("str" size " %" width(1) ",%0"        \
-                 : "=m" (*(volatile type *)addr)       \
+                 : "=m" (*addr)                        \
                  : "r" (val));                         \
 }
 
@@ -62,6 +62,15 @@ build_add_sized(add_u8_sized, "b", BYTE, uint8_t)
 build_add_sized(add_u16_sized, "h", WORD, uint16_t)
 build_add_sized(add_u32_sized, "", WORD, uint32_t)
 
+#undef BYTE
+#undef WORD
+#undef DWORD
+#undef PAIR
+
+#undef build_atomic_read
+#undef build_atomic_write
+#undef build_add_sized
+
 void __bad_atomic_size(void);
 
 #define read_atomic(p) ({                                               \
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog