From 6f7e4b21db604057311d24fd203bdba7cc7f8ee6 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 19 May 2014 09:18:11 +0200 Subject: fix printk types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some size_ts were considered long int and some compilers are picky about that. Change-Id: I671daa18eb3bfa2a7defc120e77bbb1ef72bd417 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/5788 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Kyösti Mälkki --- src/northbridge/intel/i5000/raminit.c | 2 +- src/northbridge/via/vx900/northbridge.c | 6 +++--- src/northbridge/via/vx900/raminit_ddr3.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/northbridge') diff --git a/src/northbridge/intel/i5000/raminit.c b/src/northbridge/intel/i5000/raminit.c index 4be7d5d379..9c694c7d28 100644 --- a/src/northbridge/intel/i5000/raminit.c +++ b/src/northbridge/intel/i5000/raminit.c @@ -1519,7 +1519,7 @@ static void i5000_dump_error_registers(void) static void i5000_try_restart(const char *msg) { - printk(BIOS_INFO, msg); + printk(BIOS_INFO, "%s", msg); i5000_dump_error_registers(); outb(0x06, 0xcf9); for(;;) asm volatile("hlt"); diff --git a/src/northbridge/via/vx900/northbridge.c b/src/northbridge/via/vx900/northbridge.c index 25e6045b42..91d13623bd 100644 --- a/src/northbridge/via/vx900/northbridge.c +++ b/src/northbridge/via/vx900/northbridge.c @@ -144,7 +144,7 @@ static u64 vx900_remap_above_4g(device_t mcu, u32 tolm) start8 = pci_read_config8(mcu, 0x48 + i); if (reg8 <= start8) continue; - printk(BIOS_DEBUG, "Address %x falls on rank %ld\n", tolm, i); + printk(BIOS_DEBUG, "Address %x falls on rank %zu\n", tolm, i); break; } @@ -153,12 +153,12 @@ static u64 vx900_remap_above_4g(device_t mcu, u32 tolm) end = pci_read_config8(mcu, 0x40 + i); if (end == 0) { - printk(BIOS_DEBUG, "Huh? rank %ld empty?\n", i); + printk(BIOS_DEBUG, "Huh? rank %zu empty?\n", i); continue; } if (end < (tolm >> 26)) { - printk(BIOS_DEBUG, "Huh? rank %ld don't need remap?\n", + printk(BIOS_DEBUG, "Huh? rank %zu don't need remap?\n", i); continue; } diff --git a/src/northbridge/via/vx900/raminit_ddr3.c b/src/northbridge/via/vx900/raminit_ddr3.c index f148ffe82c..a69d6999c8 100644 --- a/src/northbridge/via/vx900/raminit_ddr3.c +++ b/src/northbridge/via/vx900/raminit_ddr3.c @@ -1509,7 +1509,7 @@ static void vx900_dram_range(ramctr_timing * ctrl, rank_layout * ranks) /* vvvvvvvvvv FIXME: Fix odd rank init vvvvvvvvvv */ if ((i & 1)) { - printk(BIOS_EMERG, "I cannot initialize rank %li\n", i); + printk(BIOS_EMERG, "I cannot initialize rank %zu\n", i); print_emerg("I have to disable it\n"); continue; } -- cgit v1.2.3