Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85251?usp=email )
Change subject: soc/amd/common/psp/rpmc: fix printk format string ......................................................................
soc/amd/common/psp/rpmc: fix printk format string
While gcc didn't seem to care about that mismatch, clang didn't like that '%ld' was used in the printk format string to print a size_t variable. Replace the correct '%zu' instead of '%ld' to fix that.
Change-Id: I32bc584abe835c9c1d732c12311881345b8f0cdf Signed-off-by: Felix Held felix-coreboot@felixheld.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/85251 Reviewed-by: Marshall Dawson marshalldawson3rd@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/amd/common/block/psp/rpmc.c 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Marshall Dawson: Looks good to me, approved
diff --git a/src/soc/amd/common/block/psp/rpmc.c b/src/soc/amd/common/block/psp/rpmc.c index dd097c5..99e166a 100644 --- a/src/soc/amd/common/block/psp/rpmc.c +++ b/src/soc/amd/common/block/psp/rpmc.c @@ -78,12 +78,12 @@ static void print_spi_rpmc_usage(uint8_t available, uint8_t used) { for (size_t i = 0; i < SPI_RPMC_COUNTER_COUNT; i++) { - printk(BIOS_SPEW, "SPI flash RPMC counter %ld %s provisioned\n", i, + printk(BIOS_SPEW, "SPI flash RPMC counter %zu %s provisioned\n", i, available & BIT(i) ? "can still be" : "has already been"); }
for (size_t i = 0; i < SPI_RPMC_COUNTER_COUNT; i++) { - printk(BIOS_SPEW, "SPI flash RPMC counter %ld is%s in use\n", i, + printk(BIOS_SPEW, "SPI flash RPMC counter %zu is%s in use\n", i, used & BIT(i) ? "" : " not"); } } @@ -97,7 +97,7 @@ print_spi_rpmc_usage(psp_caps.r0.spi_rpmc_slots_available, psp_caps.r0.spi_rpmc_slot_used); for (size_t i = 0; i < PSP_RPMC_R0_SLOT_COUNT; i++) { - printk(BIOS_SPEW, "SoC RPMC slot %ld %s provisioned\n", i, + printk(BIOS_SPEW, "SoC RPMC slot %zu %s provisioned\n", i, psp_caps.r0.psp_rpmc_slot_available & BIT(i) ? "can still be" : "has already been"); }