[PATCH 2/2] common/avb_verify.c: Make use of LBAF for printing lbaint_t

Sam Protsenko semen.protsenko at linaro.org
Thu Jul 3 18:01:34 CEST 2025


On Tue, Jul 1, 2025 at 8:06 PM Tom Rini <trini at konsulko.com> wrote:
>
> When printing the contents of an lbaint_t variable we need to use LBAF
> to print it in order to get the correct format type depending on 32 or
> 64bit-ness.
>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Cc: Mattijs Korpershoek <mkorpershoek at kernel.org>
> Cc: Igor Opaniuk <igor.opaniuk at gmail.com>
> Cc: Sam Protsenko <semen.protsenko at linaro.org>
> ---

Reviewed-by: Sam Protsenko <semen.protsenko at linaro.org>

>  common/avb_verify.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common/avb_verify.c b/common/avb_verify.c
> index cff9117d92f1..29a3272579cf 100644
> --- a/common/avb_verify.c
> +++ b/common/avb_verify.c
> @@ -320,7 +320,7 @@ static unsigned long mmc_read_and_flush(struct mmc_part *part,
>         }
>         if ((start + sectors) > (part->info.start + part->info.size)) {
>                 sectors = part->info.start + part->info.size - start;
> -               printf("%s: read sector aligned to partition bounds (%ld)\n",
> +               printf("%s: read sector aligned to partition bounds (" LBAF ")\n",
>                        __func__, sectors);
>         }
>
> @@ -363,7 +363,7 @@ static unsigned long mmc_write(struct mmc_part *part, lbaint_t start,
>         }
>         if ((start + sectors) > (part->info.start + part->info.size)) {
>                 sectors = part->info.start + part->info.size - start;
> -               printf("%s: sector aligned to partition bounds (%ld)\n",
> +               printf("%s: sector aligned to partition bounds (" LBAF ")\n",
>                        __func__, sectors);
>         }
>         if (unaligned) {
> --
> 2.43.0
>


More information about the U-Boot mailing list