From 2f8ef204454d278f0c189e8c7cc70e84f745561a Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Tue, 23 Mar 2021 18:56:44 +0100 Subject: [PATCH] zephyr: redefine MAX macro to the generic one SOF is redefining MAX() to version which cannot be used in BUILD_ASSERT and logging is using it there. Redefining MAX to generic version which can be used everywhere. Signed-off-by: Krzysztof Chruscinski --- zephyr/wrapper.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index 90bfee78aa64..516ac96cc542 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -28,6 +28,13 @@ #error Define CONFIG_DYNAMIC_INTERRUPTS #endif + +/* TODO bring back zephyr MAX implementation which is used by the logging in + * that file. + */ +#undef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) + /* * Memory - Create Zephyr HEAP for SOF. *