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/commonlib/storage/sdhci.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/commonlib') diff --git a/src/commonlib/storage/sdhci.c b/src/commonlib/storage/sdhci.c index bac510e12a..a5508ee032 100644 --- a/src/commonlib/storage/sdhci.c +++ b/src/commonlib/storage/sdhci.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -38,7 +39,7 @@ || (CONFIG_SDHCI_ADMA_IN_ROMSTAGE && ENV_ROMSTAGE) \ || ENV_POSTCAR || ENV_RAMSTAGE) -__attribute__((weak)) void *dma_malloc(size_t length_in_bytes) +__weak void *dma_malloc(size_t length_in_bytes) { return malloc(length_in_bytes); } @@ -278,20 +279,20 @@ static int sdhci_send_command_bounced(struct sd_mmc_ctrlr *ctrlr, return CARD_COMM_ERR; } -__attribute__((weak)) void sdhc_log_command(struct mmc_command *cmd) +__weak void sdhc_log_command(struct mmc_command *cmd) { } -__attribute__((weak)) void sdhc_log_command_issued(void) +__weak void sdhc_log_command_issued(void) { } -__attribute__((weak)) void sdhc_log_response(uint32_t entries, +__weak void sdhc_log_response(uint32_t entries, uint32_t *response) { } -__attribute__((weak)) void sdhc_log_ret(int ret) +__weak void sdhc_log_ret(int ret) { } @@ -715,7 +716,7 @@ static int sdhci_pre_init(struct sdhci_ctrlr *sdhci_ctrlr) return 0; } -__attribute__((weak)) void soc_sd_mmc_controller_quirks(struct sd_mmc_ctrlr +__weak void soc_sd_mmc_controller_quirks(struct sd_mmc_ctrlr *ctrlr) { } -- cgit v1.2.3