[PATCH 1/5] common: fix codestyle in ALIGN macros
Alexander Aring
alex.aring at gmail.com
Mon Jun 3 19:13:48 EDT 2013
Signed-off-by: Alexander Aring <alex.aring at gmail.com>
---
include/common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/common.h b/include/common.h
index 59fcd35..293ca49 100644
--- a/include/common.h
+++ b/include/common.h
@@ -182,8 +182,8 @@ int run_shell(void);
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
-#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
-#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
+#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1)
+#define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
--
1.8.3
More information about the barebox
mailing list