[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 2/3] Arm/atomic: cosmetics
Drop redundant casts. Un-define no longer needed macros after use. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- v2: asm() style corrections split off to subsequent patch. --- a/xen/include/asm-arm/atomic.h +++ b/xen/include/asm-arm/atomic.h @@ -11,7 +11,7 @@ static inline type name(const volatile t 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 t 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, 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) ({ \ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |