From 10c43d8c37275cd8e63a0f3cac3fecdffc8af336 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 24 Mar 2022 01:04:25 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63066 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Angel Pons --- src/soc/intel/tigerlake/meminit.c | 6 ++++-- 1 file 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); }