diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-03-25 11:15:32 +0100 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2021-03-28 14:11:28 +0000 |
commit | cf72a51abf1b999c1ea9fc72c91c206b4e4bfdfb (patch) | |
tree | ab71753ec1d989db70b7be837164ed1dfceaf9eb /src | |
parent | 10a879e65bd24ac261b29445ee720538cad37653 (diff) | |
download | coreboot-cf72a51abf1b999c1ea9fc72c91c206b4e4bfdfb.tar.xz |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/amd/common/block/i2c/i2c.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |