From cbd675173c3739b483f863aef85e02d8da95acc0 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 26 Mar 2021 08:06:09 +0100 Subject: soc/amd: smbus: Use correct type for uintptr_t Fix the format warning below by using `PRIxPTR`, which is defined as unsigned long. src/soc/amd/common/block/smbus/smbus.c:33:56: error: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'uintptr_t' (aka 'unsigned long') [-Werror,-Wformat] printk(BIOS_ERR, "Invalid SMBus or ASF base %#zx\n", mmio); ~~~~ ^~~~ %#lx src/include/console/console.h:60:61: note: expanded from macro 'printk' #define printk(LEVEL, fmt, args...) do_printk(LEVEL, fmt, ##args) ~~~ ^~~~ 1 error generated. Change-Id: I727c490d3097dcf36cdbcd4db2852cd49d11785f Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/c/coreboot/+/51843 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/soc/amd/common/block/smbus/smbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/common/block/smbus/smbus.c b/src/soc/amd/common/block/smbus/smbus.c index 9fd18c5987..d2faf79e74 100644 --- a/src/soc/amd/common/block/smbus/smbus.c +++ b/src/soc/amd/common/block/smbus/smbus.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#include +#include #include #include #include @@ -30,7 +30,7 @@ static int smbus_wait_until_ready(uintptr_t mmio) { if ((mmio != (uintptr_t)acpimmio_smbus) && (mmio != (uintptr_t)acpimmio_asf)) { - printk(BIOS_ERR, "Invalid SMBus or ASF base %#zx\n", mmio); + printk(BIOS_ERR, "Invalid SMBus or ASF base %#" PRIxPTR "\n", mmio); return -1; } -- cgit v1.2.3