summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/i945/raminit.c
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2022-10-11 08:09:14 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-10-12 13:05:19 +0000
commit8917ab4346034c1794f0486aee4e6ba16684f283 (patch)
treec97678380fa5b1a8d5d5b62077eb727cd76bb69b /src/northbridge/intel/i945/raminit.c
parentb18fec54ec3edefc013084e549193e687717db19 (diff)
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 '<inttypes.h>'; did you forget to '#include <inttypes.h>'? 21 | #include "chip.h" +++ |+#include <inttypes.h> 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 <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68265 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/northbridge/intel/i945/raminit.c')
-rw-r--r--src/northbridge/intel/i945/raminit.c1
1 files changed, 1 insertions, 0 deletions
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 <device/pci_ops.h>
#include <device/pci_type.h>
#include <device/smbus_host.h>
+#include <inttypes.h>
#include <lib.h>
#include <pc80/mc146818rtc.h>
#include <spd.h>