From 66b2f2015688033a0d46d8fcc5d3f08aea1fb8b2 Mon Sep 17 00:00:00 2001 From: Werner Zeh Date: Tue, 12 Oct 2021 15:14:22 +0200 Subject: drivers/pc80/tpm: Use '%u' as printf formatter for unsigned variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use %u instead of %d for printing unsigned variables. Change-Id: I0f4bf7b80dfbde0802af8ad96fd553cb75d60e6e Signed-off-by: Werner Zeh Reviewed-on: https://review.coreboot.org/c/coreboot/+/58245 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki Reviewed-by: Patrick Georgi Reviewed-by: Angel Pons --- src/drivers/pc80/tpm/tis.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/drivers/pc80') diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c index c209e5a39e..455bcf9419 100644 --- a/src/drivers/pc80/tpm/tis.c +++ b/src/drivers/pc80/tpm/tis.c @@ -460,7 +460,7 @@ static u32 tis_senddata(const u8 *const data, u32 len) 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 @@ static u32 tis_readresponse(u8 *buffer, size_t *len) 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 @@ static u32 tis_readresponse(u8 *buffer, size_t *len) /* * 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 @@ int tis_open(void) /* 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 @@ int tis_close(void) 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; } -- cgit v1.2.3