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>
This commit is contained in:
Paul Menzel 2021-03-26 08:06:09 +01:00 committed by Felix Held
parent a5e94fec5b
commit cbd675173c
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <stdint.h> #include <inttypes.h>
#include <console/console.h> #include <console/console.h>
#include <device/smbus_host.h> #include <device/smbus_host.h>
#include <amdblocks/acpimmio.h> #include <amdblocks/acpimmio.h>
@ -30,7 +30,7 @@ static int smbus_wait_until_ready(uintptr_t mmio)
{ {
if ((mmio != (uintptr_t)acpimmio_smbus) && if ((mmio != (uintptr_t)acpimmio_smbus) &&
(mmio != (uintptr_t)acpimmio_asf)) { (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; return -1;
} }