diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-03-24 01:04:25 +0100 |
---|---|---|
committer | Arthur Heymans <arthur@aheymans.xyz> | 2022-05-13 11:00:05 +0000 |
commit | 10c43d8c37275cd8e63a0f3cac3fecdffc8af336 (patch) | |
tree | a1c822f58f4078afad70b5cdc7229d140282524b /src/soc | |
parent | 3473d16640081c984c102d489a3c927492051078 (diff) |
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')
-rw-r--r-- | src/soc/intel/tigerlake/meminit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/soc/intel/tigerlake/meminit.c b/src/soc/intel/tigerlake/meminit.c index 368e071407..ad3ed73747 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); } |