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 <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51793
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Angel Pons 2021-03-25 11:15:32 +01:00
parent 10a879e65b
commit cf72a51abf
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}