mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
arm/atomic: fix MISRA C 2012 Rule 20.7 violation
The macro parameter 'p' is used as an expression and needs to be enclosed in parentheses. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
124f138b37
commit
062790aca6
1 file changed
+4
-4
@@ -123,15 +123,15 @@ static always_inline void write_atomic_size(volatile void *p,
|
||||
}
|
||||
|
||||
#define read_atomic(p) ({ \
|
||||
union { typeof(*p) val; char c[0]; } x_; \
|
||||
read_atomic_size(p, x_.c, sizeof(*p)); \
|
||||
union { typeof(*(p)) val; char c[0]; } x_; \
|
||||
read_atomic_size(p, x_.c, sizeof(*(p))); \
|
||||
x_.val; \
|
||||
})
|
||||
|
||||
#define write_atomic(p, x) \
|
||||
do { \
|
||||
typeof(*p) x_ = (x); \
|
||||
write_atomic_size(p, &x_, sizeof(*p)); \
|
||||
typeof(*(p)) x_ = (x); \
|
||||
write_atomic_size(p, &x_, sizeof(*(p))); \
|
||||
} while ( false )
|
||||
|
||||
#define add_sized(p, x) ({ \
|
||||
|
||||