flora.fu@mediatek.com has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59298 )
Change subject: soc/mediatek/mt8195: Add message string when using _Static_assert ......................................................................
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 flora.fu@mediatek.com Change-Id: Ib146ffafc21b9dbb9d383c9343a9ec1d7c478faf --- M src/soc/mediatek/mt8195/apusys_devapc.c 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/59298/1
diff --git a/src/soc/mediatek/mt8195/apusys_devapc.c b/src/soc/mediatek/mt8195/apusys_devapc.c index cecbe47..3e86289 100644 --- a/src/soc/mediatek/mt8195/apusys_devapc.c +++ b/src/soc/mediatek/mt8195/apusys_devapc.c @@ -43,7 +43,8 @@ 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 @@ /* 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) {