diff options
author | Aaron Massey <aaronmassey@google.com> | 2022-09-20 14:17:38 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-20 22:39:18 +0000 |
commit | 656458dcc316ab75437f24fc03df273f4be2ecd0 (patch) | |
tree | c4df63f588bbf27d2e176311caf04f8e5f9b97ee | |
parent | 8bd196d17fe6224183defa231c5910fc0bd3e906 (diff) | |
download | chrome-ec-656458dcc316ab75437f24fc03df273f4be2ecd0.tar.gz |
usbc_intr_task: Cond compile pd_shared_alert_task
The pd_shared_alert_task() function gets compiled in Zephyr EC
regardless of its usage via the CONFIG_HAS_TASK_PD_INT_SHARED resulting
in inaccurate coverage results for boards without its usage.
Compile pd_shared_alert_task() if one of the following is met:
* Using Legacy-EC (No Zephyr)
* CONFIG_HAS_TASK_PD_INT_SHARED is enabled
BRANCH=none
BUG=none
TEST=zmake build -a
TEST=./twister --clobber -i -T zephyr/test/
TEST=make runhosttests -j
TEST=CQ
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: I6c96b3994bb3e5e8d64f3f172012bd42f7fcf21e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3908157
Reviewed-by: Diana Z <dzigterman@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r-- | common/usbc_intr_task.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/usbc_intr_task.c b/common/usbc_intr_task.c index 56a96a78e4..3c67ba4102 100644 --- a/common/usbc_intr_task.c +++ b/common/usbc_intr_task.c @@ -143,6 +143,7 @@ BUILD_ASSERT(PD_STATUS_TCPC_ALERT_3 == (PD_STATUS_TCPC_ALERT_0 << 3)); * is not. */ +#if !defined(CONFIG_ZEPHYR) || defined(CONFIG_HAS_TASK_PD_INT_SHARED) void pd_shared_alert_task(void *p) { const int sources_mask = (int)((intptr_t)p); @@ -209,3 +210,4 @@ void pd_shared_alert_task(void *p) } while (have_alerts != 0); } } +#endif /* !CONFIG_ZEPHYR || CONFIG_HAS_TASK_PD_INT_SHARED */ |