[coreboot-gerrit] New patch to review for coreboot: commonlib: Fix spacing issues

Lee Leahy (leroy.p.leahy@intel.com) gerrit at coreboot.org
Fri Mar 10 20:11:15 CET 2017


Lee Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18748

-gerrit

commit b82391325475f7eef1bc2a115bdba78253752cba
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date:   Fri Mar 10 10:35:43 2017 -0800

    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 at intel.com>
---
 src/commonlib/include/commonlib/coreboot_tables.h |  4 ++--
 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 7d58fdd..8902e91 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 1be1fbb..d2ef941 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))



More information about the coreboot-gerrit mailing list