From 342f8d6e507b1a5c8dfd3f48936fed32ed0997e4 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Fri, 10 Mar 2017 15:31:56 -0800 Subject: src/lib: Fix brace positions Fix the following errors detected by checkpatch.pl: ERROR: open brace '{' following function declarations go on the next line ERROR: that open brace { should be on the previous line ERROR: open brace '{' following struct go on the same line ERROR: else should follow close brace '}' TEST=Build and run on Galileo Gen2 Change-Id: I971ada9ba9ba7ce5d8029323710fee1a6166570b Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/18759 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/lib/tlcl_internal.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/lib/tlcl_internal.h') diff --git a/src/lib/tlcl_internal.h b/src/lib/tlcl_internal.h index 8261b0d0e1..3648be622a 100644 --- a/src/lib/tlcl_internal.h +++ b/src/lib/tlcl_internal.h @@ -23,7 +23,8 @@ * buffer into a variable. */ __attribute__((unused)) -static inline void to_tpm_uint32(uint8_t *buffer, uint32_t x) { +static inline void to_tpm_uint32(uint8_t *buffer, uint32_t x) +{ buffer[0] = (uint8_t)(x >> 24); buffer[1] = (uint8_t)((x >> 16) & 0xff); buffer[2] = (uint8_t)((x >> 8) & 0xff); @@ -34,7 +35,8 @@ static inline void to_tpm_uint32(uint8_t *buffer, uint32_t x) { * See comment for above function. */ __attribute__((unused)) -static inline void from_tpm_uint32(const uint8_t *buffer, uint32_t *x) { +static inline void from_tpm_uint32(const uint8_t *buffer, uint32_t *x) +{ *x = ((buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | @@ -45,7 +47,8 @@ static inline void from_tpm_uint32(const uint8_t *buffer, uint32_t *x) { * See comment for above function. */ __attribute__((unused)) -static inline void to_tpm_uint16(uint8_t *buffer, uint16_t x) { +static inline void to_tpm_uint16(uint8_t *buffer, uint16_t x) +{ buffer[0] = (uint8_t)(x >> 8); buffer[1] = (uint8_t)(x & 0xff); } @@ -54,7 +57,8 @@ static inline void to_tpm_uint16(uint8_t *buffer, uint16_t x) { * See comment for above function. */ __attribute__((unused)) -static inline void from_tpm_uint16(const uint8_t *buffer, uint16_t *x) { +static inline void from_tpm_uint16(const uint8_t *buffer, uint16_t *x) +{ *x = (buffer[0] << 8) | buffer[1]; } -- cgit v1.2.3