|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 3/3] Arm/atomic: correct coding style of asm() invocations
./CODING_STYLE mandates the asm ( "" ) form, even if it doesn't mention
asm() explicitly.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: Split off from previous patch.
--- a/xen/include/asm-arm/atomic.h
+++ b/xen/include/asm-arm/atomic.h
@@ -9,29 +9,29 @@
static inline type name(const volatile type *addr) \
{ \
type ret; \
- asm volatile("ldr" size " %" width(0) ",%1" \
- : "=r" (ret) \
- : "m" (*addr)); \
+ asm volatile ( "ldr" size " %" width(0) ",%1" \
+ : "=r" (ret) \
+ : "m" (*addr) ); \
return ret; \
}
#define build_atomic_write(name, size, width, type) \
static inline void name(volatile type *addr, type val) \
{ \
- asm volatile("str" size " %" width(1) ",%0" \
- : "=m" (*addr) \
- : "r" (val)); \
+ asm volatile ( "str" size " %" width(1) ",%0" \
+ : "=m" (*addr) \
+ : "r" (val) ); \
}
-#define build_add_sized(name, size, width, type) \
-static inline void name(volatile type *addr, type val) \
-{ \
- type t; \
- asm volatile("ldr" size " %" width(1) ",%0\n" \
- "add %" width(1) ",%" width(1) ",%" width(2) "\n" \
- "str" size " %" width(1) ",%0" \
- : "+m" (*addr), "=&r" (t) \
- : "ri" (val)); \
+#define build_add_sized(name, size, width, type) \
+static inline void name(volatile type *addr, type val) \
+{ \
+ type t; \
+ asm volatile ( "ldr" size " %" width(1) ",%0\n" \
+ "add %" width(1) ",%" width(1) ",%" width(2) "\n" \
+ "str" size " %" width(1) ",%0" \
+ : "+m" (*addr), "=&r" (t) \
+ : "ri" (val) ); \
}
#if defined (CONFIG_ARM_32)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |