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>
This commit is contained in:
Werner Zeh 2021-10-12 15:14:22 +02:00 committed by Felix Held
parent 92ab611c70
commit 66b2f20156
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}