diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-10-15 22:59:35 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-18 19:41:59 +0000 |
commit | 9229397b613fadac32f025a1be7d6549b2cd6be9 (patch) | |
tree | a0a776a17cf183848eed230ee6de44d48d180e1e /core/cortex-m0 | |
parent | fc9044a240d5a8767b7b77beda7801c6db45b0df (diff) | |
download | chrome-ec-9229397b613fadac32f025a1be7d6549b2cd6be9.tar.gz |
core/cortex-m0: Function only used when CONFIG_TASK_PROFILING is defined
When compiling with clang, it warns:
core/cortex-m0/task.c:182:19: error: unused function 'get_interrupt_context'
[-Werror,-Wunused-function]
static inline int get_interrupt_context(void)
BRANCH=none
BUG=b:172020503
TEST=make buildall -j
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I914a2a8f950a340c570f5d105859a80be3efb82a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3229479
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'core/cortex-m0')
-rw-r--r-- | core/cortex-m0/task.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c index ee7f9fb8e6..2c1bf2a8c4 100644 --- a/core/cortex-m0/task.c +++ b/core/cortex-m0/task.c @@ -179,12 +179,14 @@ inline int in_interrupt_context(void) return ret; } +#ifdef CONFIG_TASK_PROFILING static inline int get_interrupt_context(void) { int ret; asm("mrs %0, ipsr\n" : "=r"(ret)); /* read exception number */ return ret & 0x1ff; /* exception bits are the 9 LSB */ } +#endif task_id_t task_get_current(void) { |