diff options
author | Paul Menzel <pmenzel@molgen.mpg.de> | 2021-03-26 08:06:09 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-03-29 22:30:05 +0000 |
commit | cbd675173c3739b483f863aef85e02d8da95acc0 (patch) | |
tree | 45be9141c46a5c275010927a6dc365f10881d060 /src/soc/amd/common/block | |
parent | a5e94fec5b8612bfd86384209f55e95b15a602b0 (diff) |
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 <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51843
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r-- | src/soc/amd/common/block/smbus/smbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 <stdint.h> +#include <inttypes.h> #include <console/console.h> #include <device/smbus_host.h> #include <amdblocks/acpimmio.h> @@ -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; } |