summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/tigerlake/meminit.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-03-24 01:04:25 +0100
committerArthur Heymans <arthur@aheymans.xyz>2022-05-13 11:00:05 +0000
commit10c43d8c37275cd8e63a0f3cac3fecdffc8af336 (patch)
treea1c822f58f4078afad70b5cdc7229d140282524b /src/soc/intel/tigerlake/meminit.c
parent3473d16640081c984c102d489a3c927492051078 (diff)
downloadcoreboot-10c43d8c37275cd8e63a0f3cac3fecdffc8af336.tar.gz
coreboot-10c43d8c37275cd8e63a0f3cac3fecdffc8af336.tar.bz2
coreboot-10c43d8c37275cd8e63a0f3cac3fecdffc8af336.zip
soc/intel/tigerlake/meminit.c: Fix clang static asserts
Clang does not like static asserts on integral constant expressions. Change-Id: If5890a357ed95153d8ae2efa727c111b05bc6455 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63066 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel/tigerlake/meminit.c')
-rw-r--r--src/soc/intel/tigerlake/meminit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/soc/intel/tigerlake/meminit.c b/src/soc/intel/tigerlake/meminit.c
index 368e0714070a..ad3ed7374782 100644
--- a/src/soc/intel/tigerlake/meminit.c
+++ b/src/soc/intel/tigerlake/meminit.c
@@ -121,7 +121,8 @@ static void mem_init_dq_upds(FSP_M_CONFIG *mem_cfg, const struct mem_channel_dat
const size_t upd_size = sizeof(mem_cfg->DqMapCpu2DramMc0Ch0);
- _Static_assert(upd_size == CONFIG_MRC_CHANNEL_WIDTH, "Incorrect DQ UPD size!");
+ _Static_assert(sizeof(mem_cfg->DqMapCpu2DramMc0Ch0) == CONFIG_MRC_CHANNEL_WIDTH,
+ "Incorrect DQ UPD size!");
mem_init_dq_dqs_upds(dq_upds, mb_cfg->dq_map, upd_size, data);
}
@@ -142,7 +143,8 @@ static void mem_init_dqs_upds(FSP_M_CONFIG *mem_cfg, const struct mem_channel_da
const size_t upd_size = sizeof(mem_cfg->DqsMapCpu2DramMc0Ch0);
- _Static_assert(upd_size == CONFIG_MRC_CHANNEL_WIDTH / 8, "Incorrect DQS UPD size!");
+ _Static_assert(sizeof(mem_cfg->DqsMapCpu2DramMc0Ch0) == CONFIG_MRC_CHANNEL_WIDTH / 8,
+ "Incorrect DQS UPD size!");
mem_init_dq_dqs_upds(dqs_upds, mb_cfg->dqs_map, upd_size, data);
}