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:
parent
ce46c5b6a1
commit
d5a2a292b0
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue