diff options
author | Lee Leahy <leroy.p.leahy@intel.com> | 2017-03-10 10:35:43 -0800 |
---|---|---|
committer | Lee Leahy <leroy.p.leahy@intel.com> | 2017-03-10 20:30:16 +0100 |
commit | d5a2a292b0d0b2452b8b54e0ea021547d577af55 (patch) | |
tree | e2b45c9189239069932ca84bdf2a32196dc2474a | |
parent | ce46c5b6a11eebed48852f8fd1762dce015cd19b (diff) |
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)
-rw-r--r-- | src/commonlib/include/commonlib/coreboot_tables.h | 4 | ||||
-rw-r--r-- | src/commonlib/include/commonlib/helpers.h | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h index 7d58fddbb9..8902e91a45 100644 --- a/src/commonlib/include/commonlib/coreboot_tables.h +++ b/src/commonlib/include/commonlib/coreboot_tables.h @@ -241,7 +241,7 @@ struct lb_gpio { #define ACTIVE_HIGH 1 uint32_t value; #define GPIO_MAX_NAME_LENGTH 16 - uint8_t name[GPIO_MAX_NAME_LENGTH]; + uint8_t name[GPIO_MAX_NAME_LENGTH]; }; struct lb_gpios { @@ -398,7 +398,7 @@ struct cmos_entries { #define LB_TAG_OPTION_ENUM 202 struct cmos_enums { uint32_t tag; /* enumeration type */ - uint32_t size; /* length of this record */ + uint32_t size; /* length of this record */ uint32_t config_id; /* a number identifying the config id */ uint32_t value; /* the value associated with the text */ #define CMOS_MAX_TEXT_LENGTH 32 diff --git a/src/commonlib/include/commonlib/helpers.h b/src/commonlib/include/commonlib/helpers.h index 1be1fbb709..d2ef94196d 100644 --- a/src/commonlib/include/commonlib/helpers.h +++ b/src/commonlib/include/commonlib/helpers.h @@ -19,17 +19,17 @@ #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #endif -#define ALIGN(x,a) __ALIGN_MASK(x,(__typeof__(x))(a)-1UL) -#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) -#define ALIGN_UP(x,a) ALIGN((x),(a)) -#define ALIGN_DOWN(x,a) ((x) & ~((__typeof__(x))(a)-1UL)) -#define IS_ALIGNED(x,a) (((x) & ((__typeof__(x))(a)-1UL)) == 0) +#define ALIGN(x, a) __ALIGN_MASK(x, (__typeof__(x))(a)-1UL) +#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask)) +#define ALIGN_UP(x, a) ALIGN((x), (a)) +#define ALIGN_DOWN(x, a) ((x) & ~((__typeof__(x))(a)-1UL)) +#define IS_ALIGNED(x, a) (((x) & ((__typeof__(x))(a)-1UL)) == 0) #ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef MAX -#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif #define ABS(a) (((a) < 0) ? (-(a)) : (a)) #define CEIL_DIV(a, b) (((a) + (b) - 1) / (b)) @@ -69,7 +69,7 @@ #if !defined(__clang__) #define check_member(structure, member, offset) _Static_assert( \ offsetof(struct structure, member) == offset, \ - "`struct " #structure "` offset for `" #member "` is not " #offset ) + "`struct " #structure "` offset for `" #member "` is not " #offset) #else #define check_member(structure, member, offset) #endif @@ -82,8 +82,8 @@ * */ #define container_of(ptr, type, member) ({ \ - const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) + const __typeof__(((type *)0)->member) *__mptr = (ptr); \ + (type *)((char *)__mptr - offsetof(type, member)); }) #ifndef __unused #define __unused __attribute__((unused)) |