Attention is currently required from: Arthur Heymans. Hello Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/63059
to review the following change.
Change subject: device/dram/ddr2.c: Fix compiling with clang ......................................................................
device/dram/ddr2.c: Fix compiling with clang
Somehow clang is confused the printram macro.
Change-Id: I1da125664a293798371341e44ac3900daa447008 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/device/dram/ddr2.c 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/63059/1
diff --git a/src/device/dram/ddr2.c b/src/device/dram/ddr2.c index 2ade8ef..e5c0405 100644 --- a/src/device/dram/ddr2.c +++ b/src/device/dram/ddr2.c @@ -509,10 +509,12 @@ dimm->ranksize_mb = 128 * reg8; /* Module density */ dimm->size_mb = dimm->ranksize_mb * dimm->ranks; - if (dimm->size_mb < 1024) + /* The printram macro confuse clang so use brackets */ + if (dimm->size_mb < 1024) { printram(" Capacity : %u MB\n", dimm->size_mb); - else + } else { printram(" Capacity : %u GB\n", dimm->size_mb >> 10); + }
/* SDRAM Maximum Cycle Time (tCKmax) */ if (spd_decode_bcd_time(&dimm->tCK, spd[43]) != CB_SUCCESS) {