summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2018-05-16 11:31:34 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-05-17 19:34:48 -0700
commitae6d7a30c333308a5aebdfc0b7dc012a2a50324a (patch)
tree8b28cbb9bec8a1da7ec9a7447b2a000f0ae066dd /core
parentb3311c23b1fdc38daeb5e169d6e48fa62cac251e (diff)
downloadchrome-ec-ae6d7a30c333308a5aebdfc0b7dc012a2a50324a.tar.gz
make local functions static inline
They're only used within the same file and should always be inlined. It also helps gcc 8.1's lto linking which seems to not inline it (since inline is just a hint) but then drops the function (presumably because it's small, marked inline, and comes with no prototype). BUG=b:65441143 BRANCH=none TEST=builds with gcc 8.1 Change-Id: I881a5b9f13192dd11748d8a3060788f95a84dec0 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/1061075 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@google.com>
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/task.c2
-rw-r--r--core/cortex-m0/task.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index bab5310245..b2515e4d3f 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -210,7 +210,7 @@ inline int in_interrupt_context(void)
return ret;
}
-inline int get_interrupt_context(void)
+static inline int get_interrupt_context(void)
{
int ret;
asm("mrs %0, ipsr \n":"=r"(ret)); /* read exception number */
diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c
index 27465080a6..a137bf7cee 100644
--- a/core/cortex-m0/task.c
+++ b/core/cortex-m0/task.c
@@ -165,7 +165,7 @@ inline int in_interrupt_context(void)
return ret;
}
-inline int get_interrupt_context(void)
+static inline int get_interrupt_context(void)
{
int ret;
asm("mrs %0, ipsr\n" : "=r"(ret)); /* read exception number */