From 6403167d290da235a732bd2d6157aa2124fb403a Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Sat, 21 Apr 2018 14:45:32 -0600 Subject: compiler.h: add __weak macro Instead of writing out '__attribute__((weak))' use a shorter form. Change-Id: If418a1d55052780077febd2d8f2089021f414b91 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/25767 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Justin TerAvest --- src/mainboard/google/reef/mainboard.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mainboard/google/reef/mainboard.c') diff --git a/src/mainboard/google/reef/mainboard.c b/src/mainboard/google/reef/mainboard.c index 7f5a1b3857..6831d57790 100644 --- a/src/mainboard/google/reef/mainboard.c +++ b/src/mainboard/google/reef/mainboard.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -30,7 +31,7 @@ #include /* override specific gpio by sku id */ -const struct pad_config __attribute__((weak)) +const struct pad_config __weak *variant_sku_gpio_table(size_t *num) { *num = 0; @@ -73,7 +74,7 @@ uint8_t sku_strapping_value(void) return gpio_base3_value(board_sku_gpios, num); } -uint8_t __attribute__((weak)) variant_board_sku(void) +uint8_t __weak variant_board_sku(void) { static int board_sku_num = -1; @@ -84,7 +85,7 @@ uint8_t __attribute__((weak)) variant_board_sku(void) } /* Set variant board sku to ec by sku id */ -void __attribute__((weak)) variant_board_ec_set_skuid(void) +void __weak variant_board_ec_set_skuid(void) { } @@ -97,7 +98,7 @@ const char *smbios_mainboard_sku(void) return sku_str; } -void __attribute__((weak)) variant_nhlt_oem_overrides(const char **oem_id, +void __weak variant_nhlt_oem_overrides(const char **oem_id, const char **oem_table_id, uint32_t *oem_revision) { -- cgit v1.2.3