complier.h: add __noreturn and use it in code base

Add a __noreturn macro that wraps __attribute__((noreturn)) and replace
current users with the macro.

Change-Id: Iddd0728cf79678c3d1c1f7e7946c27375a644a7d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/28505
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Aaron Durbin
2018-09-05 09:37:11 -06:00
committed by Patrick Georgi
parent 261d626669
commit 0370bcf40c
11 changed files with 25 additions and 22 deletions

View File

@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
#include <compiler.h>
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/lxdef.h>
@@ -33,7 +34,7 @@ static void banner(const char *s)
printk(BIOS_DEBUG, " * %s\n", s);
}
static void __attribute__((noreturn)) hcf(void)
static void __noreturn hcf(void)
{
printk(BIOS_EMERG, "DIE\n");
/* this guarantees we flush the UART fifos (if any) and also