From 4beeb90813e24dc81a93872b7b86ffa5797539c0 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 23 Mar 2022 22:47:06 +0100 Subject: [PATCH] device/dram/common.h: Use C over CPP This fixes building with clang. Change-Id: Ia8511ab46184aa0d8ee3a79c3ef22614aeb61298 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/63057 Tested-by: build bot (Jenkins) Reviewed-by: Elyes Haouas Reviewed-by: Angel Pons --- src/include/device/dram/common.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/include/device/dram/common.h b/src/include/device/dram/common.h index 9475853924..8d8a8b870c 100644 --- a/src/include/device/dram/common.h +++ b/src/include/device/dram/common.h @@ -40,11 +40,11 @@ * disabled. * @{ */ -#if CONFIG(DEBUG_RAM_SETUP) -#define printram(x, ...) printk(BIOS_DEBUG, x, ##__VA_ARGS__) -#else -#define printram(x, ...) -#endif +#define printram(x, ...) \ + do { \ + if (CONFIG(DEBUG_RAM_SETUP)) \ + printk(BIOS_DEBUG, x, ##__VA_ARGS__); \ + } while (0) /** @} */ /** Result of the SPD decoding process */