From cf72a51abf1b999c1ea9fc72c91c206b4e4bfdfb Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 25 Mar 2021 11:15:32 +0100 Subject: soc/amd/common/block/i2c: Fix printf format specifiers The correct printf format specifier for an `unsigned int` is `%u`. Change-Id: Iaf780eb366f8c3493b89beb9a5643fa285e7825d Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/51793 Reviewed-by: Karthik Ramasubramanian Reviewed-by: Marshall Dawson Reviewed-by: Paul Menzel Reviewed-by: Felix Held Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/i2c/i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/soc/amd/common/block/i2c/i2c.c') diff --git a/src/soc/amd/common/block/i2c/i2c.c b/src/soc/amd/common/block/i2c/i2c.c index ec05e49204..30fa6e7362 100644 --- a/src/soc/amd/common/block/i2c/i2c.c +++ b/src/soc/amd/common/block/i2c/i2c.c @@ -21,7 +21,7 @@ uintptr_t dw_i2c_base_address(unsigned int bus) const struct soc_i2c_ctrlr_info *ctrlr = soc_get_i2c_ctrlr_info(&num_ctrlrs); if (bus >= num_ctrlrs) { - printk(BIOS_ERR, "Bus ID %d is >= number of I2C controllers %zu\n", + printk(BIOS_ERR, "Bus ID %u is >= number of I2C controllers %zu\n", bus, num_ctrlrs); return 0; } @@ -35,7 +35,7 @@ const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus) const struct dw_i2c_bus_config *cfg = soc_get_i2c_bus_config(&num_buses); if (bus >= num_buses) { - printk(BIOS_ERR, "Bus ID %d is >= number of I2C buses %zu\n", bus, num_buses); + printk(BIOS_ERR, "Bus ID %u is >= number of I2C buses %zu\n", bus, num_buses); return NULL; } @@ -101,7 +101,7 @@ static void dw_i2c_soc_init(bool is_early_init) continue; if (dw_i2c_init(bus, cfg)) { - printk(BIOS_ERR, "Failed to init i2c bus %d\n", bus); + printk(BIOS_ERR, "Failed to init i2c bus %u\n", bus); continue; } -- cgit v1.2.3