diff options
author | Werner Zeh <werner.zeh@siemens.com> | 2021-10-12 15:14:22 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-10-25 16:12:15 +0000 |
commit | 66b2f2015688033a0d46d8fcc5d3f08aea1fb8b2 (patch) | |
tree | e50ac86ba4273afafe9c8a1f90cbe6066b1c2cca /src | |
parent | 92ab611c7055dc33aca822e098e19baa84eb975a (diff) |
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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58245
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/pc80/tpm/tis.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |