[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] Arm/atomic: cosmetics



commit 2455983ac4c03dae33b330c98e38e447478416d6
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Mar 14 16:40:12 2019 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
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 <jbeulich@xxxxxxxx>
    Reviewed-by: Julien Grall <julien.grall@xxxxxxx>
---
 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#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.