Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/58245 )
Change subject: drivers/pc80/tpm: Use '%u' as printf formatter for unsigned variables ......................................................................
drivers/pc80/tpm: Use '%u' as printf formatter for unsigned variables
Use %u instead of %d for printing unsigned variables.
Change-Id: I0f4bf7b80dfbde0802af8ad96fd553cb75d60e6e Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M src/drivers/pc80/tpm/tis.c 1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/58245/1
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c index c209e5a..455bcf9 100644 --- a/src/drivers/pc80/tpm/tis.c +++ b/src/drivers/pc80/tpm/tis.c @@ -460,7 +460,7 @@ stopwatch_init_usecs_expire(&sw, MAX_DELAY_US); while (!burst) { if (stopwatch_expired(&sw)) { - printf("%s:%d failed to feed %d bytes of %d\n", + printf("%s:%d failed to feed %u bytes of %u\n", __FILE__, __LINE__, len - offset, len); return TPM_DRIVER_ERR; } @@ -572,7 +572,7 @@
if ((expected_count < offset) || (expected_count > *len)) { - printf("%s:%d bad response size %d\n", + printf("%s:%d bad response size %u\n", __FILE__, __LINE__, expected_count); return TPM_DRIVER_ERR; @@ -602,7 +602,7 @@
/* * Make sure we indeed read all there was. */ if (tis_has_valid_data(locality)) { - printf("%s:%d wrong receive status: %x %d bytes left\n", + printf("%s:%d wrong receive status: %x %u bytes left\n", __FILE__, __LINE__, tpm_read_status(locality), tpm_read_burst_count(locality)); return TPM_DRIVER_ERR; @@ -649,7 +649,7 @@
/* did we get a lock? */ if (tis_wait_received_access(locality)) { - printf("%s:%d - failed to lock locality %d\n", + printf("%s:%d - failed to lock locality %u\n", __FILE__, __LINE__, locality); return TPM_DRIVER_ERR; } @@ -676,7 +676,7 @@ if (tis_has_access(locality)) { tis_drop_access(locality); if (tis_wait_dropped_access(locality)) { - printf("%s:%d - failed to release locality %d\n", + printf("%s:%d - failed to release locality %u\n", __FILE__, __LINE__, locality); return TPM_DRIVER_ERR; }