summaryrefslogtreecommitdiff
path: root/include/compile_time_macros.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-21 16:27:32 -0700
committerCommit Bot <commit-bot@chromium.org>2020-12-24 00:01:32 +0000
commitbab787e065cac46be3a3070b4060741108601475 (patch)
tree3c7d60c804eb203b0bf3c7bebb068c4ae6fbf4e6 /include/compile_time_macros.h
parentda9bdddf31d1280e8dccf801c4fabf1d33478db3 (diff)
downloadchrome-ec-bab787e065cac46be3a3070b4060741108601475.tar.gz
zephyr: Avoid duplicate definition of GENMASK, etc.
These two macros are defined by Zephyr after this header is included. Avoid this with an #ifdef. BUG=b:175434113 BRANCH=none TEST=build zephyr for volteer Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Iaa802de3e49bbdbb68bf9044be28a93bd095c7de Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2600227 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/compile_time_macros.h')
-rw-r--r--include/compile_time_macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/compile_time_macros.h b/include/compile_time_macros.h
index 15432549d3..3844898084 100644
--- a/include/compile_time_macros.h
+++ b/include/compile_time_macros.h
@@ -83,7 +83,7 @@
*/
#ifndef CONFIG_ZEPHYR
#define GENMASK(h, l) (((BIT(h)<<1) - 1) ^ (BIT(l) - 1))
-#endif
#define GENMASK_ULL(h, l) (((BIT_ULL(h)<<1) - 1) ^ (BIT_ULL(l) - 1))
+#endif
#endif /* __CROS_EC_COMPILE_TIME_MACROS_H */