From f3b2c157f561d8311f47474444166859df08d282 Mon Sep 17 00:00:00 2001 From: Flora Fu Date: Mon, 15 Nov 2021 14:29:55 +0800 Subject: [PATCH] soc/mediatek/mt8195: Add message string when using _Static_assert The _Static_assert without message string is only available since C++17. Add the message to avoid build fail in the macro. BUG=b:203145462 BRANCH=cherry TEST=build pass and boot pass Signed-off-by: Flora Fu Change-Id: Ib146ffafc21b9dbb9d383c9343a9ec1d7c478faf Reviewed-on: https://review.coreboot.org/c/coreboot/+/59298 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/soc/mediatek/mt8195/apusys_devapc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/soc/mediatek/mt8195/apusys_devapc.c b/src/soc/mediatek/mt8195/apusys_devapc.c index cecbe47d4f..3e86289c28 100644 --- a/src/soc/mediatek/mt8195/apusys_devapc.c +++ b/src/soc/mediatek/mt8195/apusys_devapc.c @@ -43,7 +43,8 @@ static const struct apc_apu_dom_16 apusys_noc_dapc[] = { DAPC_APU_NOC_AO_SYS0_ATTR("slv04_05_06_07-2", NO_PROTECTION, FORBIDDEN15), DAPC_APU_NOC_AO_SYS0_ATTR("slv04_05_06_07-3", NO_PROTECTION, FORBIDDEN15), }; -_Static_assert(ARRAY_SIZE(apusys_noc_dapc) == APUSYS_NOC_DAPC_AO_SLAVE_NUM); +_Static_assert(ARRAY_SIZE(apusys_noc_dapc) == APUSYS_NOC_DAPC_AO_SLAVE_NUM, + "Wrong size on apusys_noc_dapc"); /* AO DAPC */ static const struct apc_apu_dom_16 apusys_ao_apc[] = { @@ -141,7 +142,8 @@ static const struct apc_apu_dom_16 apusys_ao_apc[] = { /* 70 */ DAPC_APU_AO_SYS0_ATTR("apb_infra_dbg_ctl", NO_PROTECTION, FORBIDDEN15), }; -_Static_assert(ARRAY_SIZE(apusys_ao_apc) == APUSYS_APC_SYS0_AO_SLAVE_NUM); +_Static_assert(ARRAY_SIZE(apusys_ao_apc) == APUSYS_APC_SYS0_AO_SLAVE_NUM, + "Wrong size on apusys_ao_apc"); static int set_slave_noc_dapc(u32 slave, enum domain_id domain_id, enum devapc_perm_type perm) {