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:
committed by
Patrick Georgi
parent
261d626669
commit
0370bcf40c
@@ -265,7 +265,7 @@ static uint32_t *sysctr_cntfid0_ptr = (void *)(SYSCTR_CTLR_BASE + 0x20);
|
||||
/* Utility functions. */
|
||||
|
||||
static inline void __attribute__((always_inline))
|
||||
__attribute__((noreturn)) halt(void)
|
||||
__noreturn halt(void)
|
||||
{
|
||||
for (;;);
|
||||
}
|
||||
@@ -290,7 +290,7 @@ static inline void clrbits32(uint32_t bits, void *addr)
|
||||
write32(addr, read32(addr) & ~bits);
|
||||
}
|
||||
|
||||
static void __attribute__((noreturn)) reset(void)
|
||||
static void __noreturn reset(void)
|
||||
{
|
||||
write32(clk_rst_rst_devices_l_ptr, SWR_TRIG_SYS_RST);
|
||||
halt();
|
||||
|
@@ -429,7 +429,7 @@ enum {
|
||||
/* Utility functions. */
|
||||
|
||||
static inline void __attribute__((always_inline))
|
||||
__attribute__((noreturn)) halt(void)
|
||||
__noreturn halt(void)
|
||||
{
|
||||
for (;;);
|
||||
}
|
||||
@@ -454,7 +454,7 @@ static inline void clrbits32(uint32_t bits, void *addr)
|
||||
write32(addr, read32(addr) & ~bits);
|
||||
}
|
||||
|
||||
static void __attribute__((noreturn)) reset(void)
|
||||
static void __noreturn reset(void)
|
||||
{
|
||||
write32(clk_rst_rst_devices_l_ptr, SWR_TRIG_SYS_RST);
|
||||
halt();
|
||||
|
Reference in New Issue
Block a user