diff options
author | Tom Hughes <tomhughes@chromium.org> | 2020-07-28 11:54:18 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-17 20:14:48 +0000 |
commit | 84c97f043260e0b06b585ae2a46cc4e9977e0ccd (patch) | |
tree | f0dc2821c9df89780f98b6ab0b98b236056eda06 /chip/ish | |
parent | aca8db3d63a3521784d5b6ca38f285bc7680404d (diff) | |
download | chrome-ec-84c97f043260e0b06b585ae2a46cc4e9977e0ccd.tar.gz |
Replace __attribute__((noreturn)) with noreturn
_Noreturn was added in C11 and the convenience macro "noreturn" is
specified by stdnoreturn.h:
https://en.cppreference.com/w/c/language/_Noreturn.
BRANCH=none
BUG=none
TEST=make buildall -j
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I30361bb5290cea1c776a7356f7e3a68edf1f8e39
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2324816
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'chip/ish')
-rw-r--r-- | chip/ish/power_mgt.c | 8 | ||||
-rw-r--r-- | chip/ish/power_mgt.h | 6 | ||||
-rw-r--r-- | chip/ish/system.c | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/chip/ish/power_mgt.c b/chip/ish/power_mgt.c index ca03d6c29a..6664b589a8 100644 --- a/chip/ish/power_mgt.c +++ b/chip/ish/power_mgt.c @@ -3,6 +3,8 @@ * found in the LICENSE file. */ +#include <stdnoreturn.h> + #include "aontaskfw/ish_aon_share.h" #include "console.h" #include "hwtimer.h" @@ -256,7 +258,7 @@ static void switch_to_aontask(void) interrupt_enable(); } -__attribute__ ((noreturn)) +noreturn static void handle_reset_in_aontask(enum ish_pm_state pm_state) { pm_ctx.aon_share->pm_state = pm_state; @@ -649,7 +651,7 @@ void ish_pm_init(void) } } -__attribute__ ((noreturn)) +noreturn void ish_pm_reset(enum ish_pm_state pm_state) { if (IS_ENABLED(CONFIG_ISH_PM_AONTASK) && @@ -756,7 +758,7 @@ DECLARE_IRQ(ISH_PMU_WAKEUP_IRQ, pmu_wakeup_isr); * */ -__maybe_unused __attribute__ ((noreturn)) +__maybe_unused noreturn static void reset_prep_isr(void) { /* mask reset prep avail interrupt */ diff --git a/chip/ish/power_mgt.h b/chip/ish/power_mgt.h index 6144502286..a1fd5aabb6 100644 --- a/chip/ish/power_mgt.h +++ b/chip/ish/power_mgt.h @@ -6,6 +6,8 @@ #ifndef __CROS_EC_POWER_MGT_H #define __CROS_EC_POWER_MGT_H +#include <stdnoreturn.h> + #include "common.h" #include "registers.h" @@ -56,7 +58,7 @@ static inline void ish_mia_halt(void) } /* reset ISH mintue-ia cpu core */ -__attribute__((noreturn)) +noreturn static inline void ish_mia_reset(void) { /** @@ -81,7 +83,7 @@ __maybe_unused static void ish_pm_init(void) /** * reset ISH (reset minute-ia cpu core, and power off main SRAM) */ -void ish_pm_reset(enum ish_pm_state pm_state) __attribute__((noreturn)); +noreturn void ish_pm_reset(enum ish_pm_state pm_state); /** * notify the power management module that the UART for the console is in use. diff --git a/chip/ish/system.c b/chip/ish/system.c index caa5e15255..1e6fe87800 100644 --- a/chip/ish/system.c +++ b/chip/ish/system.c @@ -57,7 +57,7 @@ uint32_t chip_read_reset_flags(void) * Used when the watchdog timer exceeds max retries and we want to * disable ISH completely. */ -__attribute__((noreturn)) +noreturn static void system_halt(void) { cflush(); |