[PATCH 6/6] drivers: tpm: atmel_twi: fix printf specifier compile warning

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Nov 4 08:41:23 CET 2021


On Thu, 4 Nov 2021 at 03:14, Mathew McBride <matt at traverse.com.au> wrote:
>
> %d was being used as the specifier for size_t, leading to a
> compiler warning
>
> Signed-off-by: Mathew McBride <matt at traverse.com.au>
> ---
>  drivers/tpm/tpm_atmel_twi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tpm/tpm_atmel_twi.c b/drivers/tpm/tpm_atmel_twi.c
> index 9ca33e4334..e84f9183d1 100644
> --- a/drivers/tpm/tpm_atmel_twi.c
> +++ b/drivers/tpm/tpm_atmel_twi.c
> @@ -116,7 +116,7 @@ static int tpm_atmel_twi_xfer(struct udevice *dev,
>                 }
>         }
>         if (res) {
> -               printf("i2c_read returned %d (rlen=%d)\n", res, *recv_len);
> +               printf("i2c_read returned %d (rlen=%zu)\n", res, *recv_len);
>  #ifdef DEBUG
>                 print_buffer(0, recvbuf, 1, *recv_len, 0);
>  #endif
> --
> 2.30.1
>
At some point we might want to change all these prints to log
debugging /error messages.  However the current patch is a straight up
fix so

Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>


More information about the U-Boot mailing list