diff options
author | Aaron Durbin <adurbin@chromium.org> | 2018-04-21 14:45:32 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-04-24 14:37:59 +0000 |
commit | 6403167d290da235a732bd2d6157aa2124fb403a (patch) | |
tree | 9c4805af37a31830934f91098d299e967df930c6 /src/lib/coreboot_table.c | |
parent | 38fd6685e9da61daadc96a8d537e6966dfe3b219 (diff) |
compiler.h: add __weak macro
Instead of writing out '__attribute__((weak))' use a shorter form.
Change-Id: If418a1d55052780077febd2d8f2089021f414b91
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'src/lib/coreboot_table.c')
-rw-r--r-- | src/lib/coreboot_table.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index e786443cf6..2970215034 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -16,6 +16,7 @@ */ #include <arch/cbconfig.h> +#include <compiler.h> #include <console/console.h> #include <console/uart.h> #include <ip_checksum.h> @@ -244,9 +245,9 @@ static inline void lb_vboot_handoff(struct lb_header *header) {} #endif /* CONFIG_VBOOT */ #endif /* CONFIG_CHROMEOS */ -__attribute__((weak)) uint32_t board_id(void) { return UNDEFINED_STRAPPING_ID; } -__attribute__((weak)) uint32_t ram_code(void) { return UNDEFINED_STRAPPING_ID; } -__attribute__((weak)) uint32_t sku_id(void) { return UNDEFINED_STRAPPING_ID; } +__weak uint32_t board_id(void) { return UNDEFINED_STRAPPING_ID; } +__weak uint32_t ram_code(void) { return UNDEFINED_STRAPPING_ID; } +__weak uint32_t sku_id(void) { return UNDEFINED_STRAPPING_ID; } static void lb_board_id(struct lb_header *header) { @@ -441,7 +442,7 @@ static void lb_record_version_timestamp(struct lb_header *header) rec->timestamp = coreboot_version_timestamp; } -void __attribute__((weak)) lb_board(struct lb_header *header) { /* NOOP */ } +void __weak lb_board(struct lb_header *header) { /* NOOP */ } /* * It's possible that the system is using a SPI flash as the boot device, @@ -449,7 +450,7 @@ void __attribute__((weak)) lb_board(struct lb_header *header) { /* NOOP */ } * case don't provide any information as the correct information is * not known. */ -void __attribute__((weak)) lb_spi_flash(struct lb_header *header) { /* NOOP */ } +void __weak lb_spi_flash(struct lb_header *header) { /* NOOP */ } static struct lb_forward *lb_forward(struct lb_header *header, struct lb_header *next_header) |