From 8917ab4346034c1794f0486aee4e6ba16684f283 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Tue, 11 Oct 2022 08:09:14 +0200 Subject: [PATCH] nb/intel/i945/raminit: Include `inttypes.h` for PRIxPTR Selecting *Output verbose RAM init debug messages* (`CONFIG_DEBUG_RAM_SETUP=y`) the build fails due to the missing header. CC romstage/northbridge/intel/i945/raminit.o src/northbridge/intel/i945/raminit.c: In function 'ram_read32': src/northbridge/intel/i945/raminit.c:77:39: error: expected ')' before 'PRIxPTR' 77 | PRINTK_DEBUG(" RAM read: %" PRIxPTR "\n", offset); | ^~~~~~~ src/northbridge/intel/i945/raminit.c:25:52: note: in definition of macro 'PRINTK_DEBUG' 25 | #define PRINTK_DEBUG(x...) printk(BIOS_DEBUG, x) | ^ src/northbridge/intel/i945/raminit.c:22:1: note: 'PRIxPTR' is defined in header ''; did you forget to '#include '? 21 | #include "chip.h" +++ |+#include 22 | src/northbridge/intel/i945/raminit.c:25:39: note: to match this '(' 25 | #define PRINTK_DEBUG(x...) printk(BIOS_DEBUG, x) | ^ src/northbridge/intel/i945/raminit.c:77:9: note: in expansion of macro 'PRINTK_DEBUG' 77 | PRINTK_DEBUG(" RAM read: %" PRIxPTR "\n", offset); | ^~~~~~~~~~~~ src/northbridge/intel/i945/raminit.c:77:22: error: spurious trailing '%' in format [-Werror=format=] 77 | PRINTK_DEBUG(" RAM read: %" PRIxPTR "\n", offset); | ^~~~~~~~~~~~~~~~ src/northbridge/intel/i945/raminit.c:25:52: note: in definition of macro 'PRINTK_DEBUG' 25 | #define PRINTK_DEBUG(x...) printk(BIOS_DEBUG, x) | ^ src/northbridge/intel/i945/raminit.c:77:36: note: format string is defined here 77 | PRINTK_DEBUG(" RAM read: %" PRIxPTR "\n", offset); | ^ Include `inttypes.h` to fix it. Fixes: e8bb6d2b16ac ("Output verbose RAM init debug messages") Change-Id: If3851ec899d4c7ce5fd64542827f9e0eb546d68b Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/c/coreboot/+/68265 Tested-by: build bot (Jenkins) Reviewed-by: Elyes Haouas Reviewed-by: Angel Pons --- src/northbridge/intel/i945/raminit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/northbridge/intel/i945/raminit.c b/src/northbridge/intel/i945/raminit.c index 35875be372..2ab4d10c35 100644 --- a/src/northbridge/intel/i945/raminit.c +++ b/src/northbridge/intel/i945/raminit.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include