]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
tpm: cr50_i2c: Make use of 'z' for printing size_t
authorTom Rini <trini@konsulko.com>
Wed, 6 Aug 2025 14:55:18 +0000 (08:55 -0600)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Mon, 25 Aug 2025 10:04:21 +0000 (13:04 +0300)
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 <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
drivers/tpm/cr50_i2c.c

index 5b2d5ccb1460549184e325a18b231fa2b745145e..14a94f8d4a8e33e9a75199a93da094ac482e492b 100644 (file)
@@ -388,7 +388,7 @@ static int cr50_i2c_recv(struct udevice *dev, u8 *buf, size_t buf_len)
        int status;
        int ret;
 
-       log_debug("%s: buf_len=%x\n", __func__, buf_len);
+       log_debug("%s: buf_len=%zx\n", __func__, buf_len);
        if (buf_len < TPM_HEADER_SIZE)
                return -E2BIG;
 
@@ -465,7 +465,7 @@ static int cr50_i2c_send(struct udevice *dev, const u8 *buf, size_t len)
        ulong timeout;
        int ret;
 
-       log_debug("len=%x\n", len);
+       log_debug("len=%zx\n", len);
        timeout = timer_get_us() + TIMEOUT_LONG_US;
        do {
                ret = cr50_i2c_status(dev);