diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/cbmem_console.c | 3 | ||||
-rw-r--r-- | src/lib/gcov-io.h | 26 | ||||
-rw-r--r-- | src/lib/imd.c | 7 | ||||
-rw-r--r-- | src/lib/libgcov.c | 18 | ||||
-rw-r--r-- | src/lib/prog_ops.c | 6 | ||||
-rw-r--r-- | src/lib/timestamp.c | 3 | ||||
-rw-r--r-- | src/lib/tpm2_tlcl_structures.h | 5 |
7 files changed, 36 insertions, 32 deletions
diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c index 34363904b5..d9716700bb 100644 --- a/src/lib/cbmem_console.c +++ b/src/lib/cbmem_console.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include <compiler.h> #include <console/console.h> #include <console/cbmem_console.h> #include <console/uart.h> @@ -43,7 +44,7 @@ struct cbmem_console { u32 size; u32 cursor; u8 body[0]; -} __attribute__ ((__packed__)); +} __packed; #define MAX_SIZE (1 << 28) /* can't be changed without breaking readers! */ #define CURSOR_MASK (MAX_SIZE - 1) /* bits 31-28 are reserved for flags */ diff --git a/src/lib/gcov-io.h b/src/lib/gcov-io.h index e2c0e0d756..4c0b2e4e42 100644 --- a/src/lib/gcov-io.h +++ b/src/lib/gcov-io.h @@ -181,29 +181,29 @@ permissions described in the GCC Runtime Library Exception, version /* About the target */ #if BITS_PER_UNIT == 8 -typedef unsigned int gcov_unsigned_t __attribute__ ((mode(SI))); -typedef unsigned int gcov_position_t __attribute__ ((mode(SI))); +typedef unsigned int gcov_unsigned_t __attribute__((mode(SI))); +typedef unsigned int gcov_position_t __attribute__((mode(SI))); #if LONG_LONG_TYPE_SIZE > 32 -typedef signed gcov_type __attribute__ ((mode(DI))); +typedef signed gcov_type __attribute__((mode(DI))); #else -typedef signed gcov_type __attribute__ ((mode(SI))); +typedef signed gcov_type __attribute__((mode(SI))); #endif #else #if BITS_PER_UNIT == 16 -typedef unsigned int gcov_unsigned_t __attribute__ ((mode(HI))); -typedef unsigned int gcov_position_t __attribute__ ((mode(HI))); +typedef unsigned int gcov_unsigned_t __attribute__((mode(HI))); +typedef unsigned int gcov_position_t __attribute__((mode(HI))); #if LONG_LONG_TYPE_SIZE > 32 -typedef signed gcov_type __attribute__ ((mode(SI))); +typedef signed gcov_type __attribute__((mode(SI))); #else -typedef signed gcov_type __attribute__ ((mode(HI))); +typedef signed gcov_type __attribute__((mode(HI))); #endif #else -typedef unsigned int gcov_unsigned_t __attribute__ ((mode(QI))); -typedef unsigned int gcov_position_t __attribute__ ((mode(QI))); +typedef unsigned int gcov_unsigned_t __attribute__((mode(QI))); +typedef unsigned int gcov_position_t __attribute__((mode(QI))); #if LONG_LONG_TYPE_SIZE > 32 -typedef signed gcov_type __attribute__ ((mode(HI))); +typedef signed gcov_type __attribute__((mode(HI))); #else -typedef signed gcov_type __attribute__ ((mode(QI))); +typedef signed gcov_type __attribute__((mode(QI))); #endif #endif #endif @@ -270,7 +270,7 @@ typedef HOST_WIDEST_INT gcov_type; #pragma GCC poison gcov_read_string gcov_sync gcov_time gcov_magic #ifdef HAVE_GAS_HIDDEN -#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__("hidden"))) +#define ATTRIBUTE_HIDDEN __attribute__((__visibility__("hidden"))) #else #define ATTRIBUTE_HIDDEN #endif diff --git a/src/lib/imd.c b/src/lib/imd.c index 8f65fa8285..d17cc815ce 100644 --- a/src/lib/imd.c +++ b/src/lib/imd.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include <compiler.h> #include <assert.h> #include <cbmem.h> #include <console/console.h> @@ -32,7 +33,7 @@ struct imd_root_pointer { uint32_t magic; /* Relative to upper limit/offset. */ int32_t root_offset; -} __attribute__((packed)); +} __packed; struct imd_entry { uint32_t magic; @@ -40,7 +41,7 @@ struct imd_entry { int32_t start_offset; uint32_t size; uint32_t id; -} __attribute__((packed)); +} __packed; struct imd_root { uint32_t max_entries; @@ -50,7 +51,7 @@ struct imd_root { /* Used for fixing the size of an imd. Relative to the root. */ int32_t max_offset; struct imd_entry entries[0]; -} __attribute__((packed)); +} __packed; #define IMD_FLAG_LOCKED 1 diff --git a/src/lib/libgcov.c b/src/lib/libgcov.c index ca5021f834..70a4073253 100644 --- a/src/lib/libgcov.c +++ b/src/lib/libgcov.c @@ -73,23 +73,23 @@ typedef s32 pid_t; /* If libc and its header files are not available, provide dummy functions. */ #ifdef L_gcov -void __gcov_init(struct gcov_info *p __attribute__ ((unused))) {} +void __gcov_init(struct gcov_info *p __attribute__((unused))) {} void __gcov_flush(void) {} #endif #ifdef L_gcov_merge_add -void __gcov_merge_add(gcov_type *counters __attribute__ ((unused)), - unsigned int n_counters __attribute__ ((unused))) {} +void __gcov_merge_add(gcov_type *counters __attribute__((unused)), + unsigned int n_counters __attribute__((unused))) {} #endif #ifdef L_gcov_merge_single -void __gcov_merge_single(gcov_type *counters __attribute__ ((unused)), - unsigned int n_counters __attribute__ ((unused))) {} +void __gcov_merge_single(gcov_type *counters __attribute__((unused)), + unsigned int n_counters __attribute__((unused))) {} #endif #ifdef L_gcov_merge_delta -void __gcov_merge_delta(gcov_type *counters __attribute__ ((unused)), - unsigned int n_counters __attribute__ ((unused))) {} +void __gcov_merge_delta(gcov_type *counters __attribute__((unused)), + unsigned int n_counters __attribute__((unused))) {} #endif #else @@ -102,8 +102,8 @@ void __gcov_merge_delta(gcov_type *counters __attribute__ ((unused)), #include <sys/stat.h> #endif #else -void __gcov_merge_add(gcov_type *counters __attribute__ ((unused)), - unsigned int n_counters __attribute__ ((unused))) {} +void __gcov_merge_add(gcov_type *counters __attribute__((unused)), + unsigned int n_counters __attribute__((unused))) {} #endif /* __COREBOOT__ */ #ifdef L_gcov diff --git a/src/lib/prog_ops.c b/src/lib/prog_ops.c index bc889fceae..44a32d19bf 100644 --- a/src/lib/prog_ops.c +++ b/src/lib/prog_ops.c @@ -23,13 +23,13 @@ void prog_segment_loaded(uintptr_t start, size_t size, int flags) arch_segment_loaded(start, size, flags); } -void __attribute__ ((weak)) platform_segment_loaded(uintptr_t start, +void __attribute__((weak)) platform_segment_loaded(uintptr_t start, size_t size, int flags) { /* do nothing */ } -void __attribute__ ((weak)) arch_segment_loaded(uintptr_t start, size_t size, +void __attribute__((weak)) arch_segment_loaded(uintptr_t start, size_t size, int flags) { /* do nothing */ @@ -41,7 +41,7 @@ void prog_run(struct prog *prog) arch_prog_run(prog); } -void __attribute__ ((weak)) platform_prog_run(struct prog *prog) +void __attribute__((weak)) platform_prog_run(struct prog *prog) { /* do nothing */ } diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c index 5f84cf4ac8..816f28fd85 100644 --- a/src/lib/timestamp.c +++ b/src/lib/timestamp.c @@ -16,6 +16,7 @@ #include <assert.h> #include <stddef.h> #include <stdint.h> +#include <compiler.h> #include <console/console.h> #include <cbmem.h> #include <symbols.h> @@ -30,7 +31,7 @@ /* When changing this number, adjust TIMESTAMP() size ASSERT() in memlayout.h */ #define MAX_BSS_TIMESTAMP_CACHE 16 -struct __attribute__((__packed__)) timestamp_cache { +struct __packed timestamp_cache { uint32_t cache_state; struct timestamp_table table; /* The struct timestamp_table has a 0 length array as its last field. diff --git a/src/lib/tpm2_tlcl_structures.h b/src/lib/tpm2_tlcl_structures.h index 4ea20783e5..2a6615df42 100644 --- a/src/lib/tpm2_tlcl_structures.h +++ b/src/lib/tpm2_tlcl_structures.h @@ -12,6 +12,7 @@ * constants and structures needed for functions used in coreboot. */ #include <stdint.h> +#include <compiler.h> #include <tpm_lite/tlcl.h> #include <types.h> @@ -56,7 +57,7 @@ struct tpm_header { uint16_t tpm_tag; uint32_t tpm_size; TPM_CC tpm_code; -} __attribute__((packed)); +} __packed; /* TPM command codes. */ #define TPM2_Hierarchy_Control ((TPM_CC)0x00000121) @@ -318,7 +319,7 @@ struct tpm2_session_header { union { struct tpm2_session_attrs session_attr_bits; uint8_t session_attrs; - } __attribute__((packed)); + } __packed; uint16_t auth_size; uint8_t *auth; }; |