From 61fe69dded30ee63444101c7fc69c8a490909a03 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 4 Jan 2022 04:21:42 +0000 Subject: [PATCH] sys: device_mmio.h replace with In include/sys/device_mmio.h, replacing fixes the following warning: $ west build -b qemu_x86 tests/arch/x86/static_idt/ In file included from zephyr/include/toolchain.h:50, from zephyr/include/linker/section_tags.h:12, from zephyr/include/linker/sections.h:132, from zephyr/include/sys/device_mmio.h:19, from zephyr/include/drivers/interrupt_controller/loapic.h:14, from zephyr/include/drivers/interrupt_controller/sysapic.h:10, from zephyr/include/arch/x86/arch.h:231, from zephyr/include/arch/cpu.h:15, from zephyr/tests/arch/x86/static_idt/src/test_stubs.S:17: zephyr/include/toolchain/gcc.h:61: error: BUILD_ASSERT redefined [-Werror] 61 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG) | In file included from zephyr/include/sys/device_mmio.h:18, from zephyr/include/drivers/interrupt_controller/loapic.h:14, from zephyr/include/drivers/interrupt_controller/sysapic.h:10, from zephyr/include/arch/x86/arch.h:231, from zephyr/include/arch/cpu.h:15, from zephyr/tests/arch/x86/static_idt/src/test_stubs.S:17: zephyr/include/toolchain/common.h:165: note: this is the location of the previous definition 165 | #define BUILD_ASSERT(EXPR, MSG...) \ provides a compiler-specific BUILD_ASSERT. provides a generic, fallback BUILD_ASSERT and should probably never be included directly. Thanks to Gerard Marull-Paretas for recommending this fix. Related to commit af20208cd942 ("devices: mark device MMIO declarations to boot/pinned sections") that added #include Signed-off-by: Marc Herbert --- include/sys/device_mmio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/device_mmio.h b/include/sys/device_mmio.h index 89b38e0636d..5599e1f3d2b 100644 --- a/include/sys/device_mmio.h +++ b/include/sys/device_mmio.h @@ -15,7 +15,7 @@ #ifndef ZEPHYR_INCLUDE_SYS_DEVICE_MMIO_H #define ZEPHYR_INCLUDE_SYS_DEVICE_MMIO_H -#include +#include #include /**