summaryrefslogtreecommitdiff
path: root/zephyr/shim
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-04-08 13:36:32 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-09 05:25:34 +0000
commitf7b050059033086772356760da618d51fe3dbdc4 (patch)
treeb69203196a3a9b850c0468d51997427fd6f3bb11 /zephyr/shim
parent393c3c20dfd15d666c84b88a23cadac1c6dadb3f (diff)
downloadchrome-ec-f7b050059033086772356760da618d51fe3dbdc4.tar.gz
zephyr: Fix compiler warnings from zephyr tests
Fix the warning that an attribute declaration must precede the definition. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I9b0394d276e0fb39983cd43269804a70139c0655 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2816140 Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r--zephyr/shim/include/zephyr_host_command.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/zephyr/shim/include/zephyr_host_command.h b/zephyr/shim/include/zephyr_host_command.h
index d8ee0c2c9b..377578311c 100644
--- a/zephyr/shim/include/zephyr_host_command.h
+++ b/zephyr/shim/include/zephyr_host_command.h
@@ -12,6 +12,8 @@
#include <init.h>
+#ifdef CONFIG_PLATFORM_EC_HOSTCMD
+
/** Node in a list of host-command handlers */
struct zshim_host_command_node {
struct host_command *cmd;
@@ -50,3 +52,7 @@ void zshim_setup_host_command(
return 0; \
} \
SYS_INIT(_setup_host_command_##line, APPLICATION, 1)
+#else /* !CONFIG_PLATFORM_EC_HOSTCMD */
+#define DECLARE_HOST_COMMAND(command, routine, version_mask) \
+ enum ec_status (routine)(struct host_cmd_handler_args *args)
+#endif /* CONFIG_PLATFORM_EC_HOSTCMD */