summaryrefslogtreecommitdiff
path: root/drivers/tpm
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-08-06 08:55:19 -0600
committerIlias Apalodimas <[email protected]>2025-08-25 13:04:21 +0300
commit83b1c7fd7119ae654aba70b2451b519035b5403d (patch)
tree9c7e56cca2927d64be80a328636ef9dca0a4ba9d /drivers/tpm
parent80afd60d9c7e24ef193b0d59ce98a3d86a70fcb5 (diff)
tpm: tpm_tis_infineon: Make use of 'z' for printing size_t
When printing the contents of an size_t variable we need to use z prefix to the format character in order to get the correct format type depending on 32 or 64bit-ness. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'drivers/tpm')
-rw-r--r--drivers/tpm/tpm_tis_infineon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tpm/tpm_tis_infineon.c b/drivers/tpm/tpm_tis_infineon.c
index e2f6238cbc7..de6566fdb9e 100644
--- a/drivers/tpm/tpm_tis_infineon.c
+++ b/drivers/tpm/tpm_tis_infineon.c
@@ -396,7 +396,7 @@ static int tpm_tis_i2c_recv(struct udevice *dev, u8 *buf, size_t count)
expected = get_unaligned_be32(buf + TPM_RSP_SIZE_BYTE);
if ((size_t)expected > count || (size_t)expected < TPM_HEADER_SIZE) {
- debug("Error size=%x, expected=%x, count=%x\n", size, expected,
+ debug("Error size=%x, expected=%x, count=%zx\n", size, expected,
count);
return -ENOSPC;
}
@@ -429,7 +429,7 @@ static int tpm_tis_i2c_send(struct udevice *dev, const u8 *buf, size_t len)
int retry = 0;
u8 sts = TPM_STS_GO;
- debug("%s: len=%d\n", __func__, len);
+ debug("%s: len=%zd\n", __func__, len);
if (len > TPM_DEV_BUFSIZE)
return -E2BIG; /* Command is too long for our tpm, sorry */