commonlib: Fix spacing issues

Fix the following errors and warnings detected by checkpatch.pl:

ERROR: space required after that ',' (ctx:VxV)
ERROR: space required after that ';' (ctx:VxV)
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
WARNING: please, no spaces at the start of a line
WARNING: please, no space before tabs

TEST=Build and run on Galileo Gen2

Change-Id: I54877f60eb5fdf3f6d8729711c55ff5a284d22cf
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18748
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Lee Leahy 2017-03-10 10:35:43 -08:00
parent ce46c5b6a1
commit d5a2a292b0
2 changed files with 12 additions and 12 deletions

View File

@ -19,17 +19,17 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#endif #endif
#define ALIGN(x,a) __ALIGN_MASK(x,(__typeof__(x))(a)-1UL) #define ALIGN(x, a) __ALIGN_MASK(x, (__typeof__(x))(a)-1UL)
#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) #define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
#define ALIGN_UP(x,a) ALIGN((x),(a)) #define ALIGN_UP(x, a) ALIGN((x), (a))
#define ALIGN_DOWN(x,a) ((x) & ~((__typeof__(x))(a)-1UL)) #define ALIGN_DOWN(x, a) ((x) & ~((__typeof__(x))(a)-1UL))
#define IS_ALIGNED(x,a) (((x) & ((__typeof__(x))(a)-1UL)) == 0) #define IS_ALIGNED(x, a) (((x) & ((__typeof__(x))(a)-1UL)) == 0)
#ifndef MIN #ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif #endif
#ifndef MAX #ifndef MAX
#define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif #endif
#define ABS(a) (((a) < 0) ? (-(a)) : (a)) #define ABS(a) (((a) < 0) ? (-(a)) : (a))
#define CEIL_DIV(a, b) (((a) + (b) - 1) / (b)) #define CEIL_DIV(a, b) (((a) + (b) - 1) / (b))
@ -69,7 +69,7 @@
#if !defined(__clang__) #if !defined(__clang__)
#define check_member(structure, member, offset) _Static_assert( \ #define check_member(structure, member, offset) _Static_assert( \
offsetof(struct structure, member) == offset, \ offsetof(struct structure, member) == offset, \
"`struct " #structure "` offset for `" #member "` is not " #offset ) "`struct " #structure "` offset for `" #member "` is not " #offset)
#else #else
#define check_member(structure, member, offset) #define check_member(structure, member, offset)
#endif #endif
@ -82,8 +82,8 @@
* *
*/ */
#define container_of(ptr, type, member) ({ \ #define container_of(ptr, type, member) ({ \
const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \ const __typeof__(((type *)0)->member) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );}) (type *)((char *)__mptr - offsetof(type, member)); })
#ifndef __unused #ifndef __unused
#define __unused __attribute__((unused)) #define __unused __attribute__((unused))