From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Patrice Chotard <patrice.chotard@foss.st.com>, u-boot@lists.denx.de
Cc: Patrice CHOTARD <patrice.chotard@foss.st.com>,
Patrick DELAUNAY <patrick.delaunay@foss.st.com>,
U-Boot STM32 <uboot-stm32@st-md-mailman.stormreply.com>,
Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v1 1/6] fastboot: Fix warning when CONFIG_SYS_64BIT_LBA is enable
Date: Tue, 03 Dec 2024 10:46:29 +0100 [thread overview]
Message-ID: <8734j5p096.fsf@baylibre.com> (raw)
In-Reply-To: <20241129122711.411917-2-patrice.chotard@foss.st.com>
Hi Patrice,
Thank you for the patch.
On ven., nov. 29, 2024 at 13:27, Patrice Chotard <patrice.chotard@foss.st.com> wrote:
> If CONFIG_SYS_64BIT_LBA is enable, following compilation warning is
> triggered:
>
> CC drivers/fastboot/fb_mmc.o
> ../drivers/fastboot/fb_mmc.c: In function 'fb_mmc_erase_mmc_hwpart':
> ../drivers/fastboot/fb_mmc.c:215:35: warning: format '%lu' expects
> argument of type 'long unsigned int', but argument 2 has type
> 'long long unsigned int' [-Wformat=]
> 215 | printf("........ erased %lu bytes from mmc hwpart[%u]\n",
> | ~~^
> | |
> | long unsigned int
> | %llu
> 216 | dev_desc->lba * dev_desc->blksz, dev_desc->hwpart);
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | |
> | long long unsigned int
> ../drivers/fastboot/fb_mmc.c: In function 'fb_mmc_boot_ops':
> ../drivers/fastboot/fb_mmc.c:261:42: warning: format '%lu' expects
> argument of type 'long unsigned int', but argument 2 has type
> 'long long unsigned int' [-Wformat=]
> 261 | printf("........ wrote %lu bytes to EMMC_BOOT%d\n",
> | ~~^
> | |
> | long unsigned int
> | %llu
> 262 | blkcnt * blksz, hwpart);
> | ~~~~~~~~~~~~~~
> | |
> | long long unsigned int
>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Please feel free to take this through your tree.
Acked-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
>
> drivers/fastboot/fb_mmc.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
> index f11eb66761b..dca7c222f35 100644
> --- a/drivers/fastboot/fb_mmc.c
> +++ b/drivers/fastboot/fb_mmc.c
> @@ -211,8 +211,8 @@ static int fb_mmc_erase_mmc_hwpart(struct blk_desc *dev_desc)
> return 1;
> }
>
> - printf("........ erased %lu bytes from mmc hwpart[%u]\n",
> - dev_desc->lba * dev_desc->blksz, dev_desc->hwpart);
> + printf("........ erased %llu bytes from mmc hwpart[%u]\n",
> + (u64)(dev_desc->lba * dev_desc->blksz), dev_desc->hwpart);
>
> return 0;
> }
> @@ -257,8 +257,8 @@ static void fb_mmc_boot_ops(struct blk_desc *dev_desc, void *buffer,
> return;
> }
>
> - printf("........ wrote %lu bytes to EMMC_BOOT%d\n",
> - blkcnt * blksz, hwpart);
> + printf("........ wrote %llu bytes to EMMC_BOOT%d\n",
> + (u64)(blkcnt * blksz), hwpart);
> } else { /* erase */
> if (fb_mmc_erase_mmc_hwpart(dev_desc)) {
> pr_err("Failed to erase EMMC_BOOT%d\n", hwpart);
> --
> 2.25.1
next prev parent reply other threads:[~2024-12-03 9:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 12:27 [PATCH v1 0/6] Enable SYS_64BIT_LBA flag for STM32MP Patrice Chotard
2024-11-29 12:27 ` [PATCH v1 1/6] fastboot: Fix warning when CONFIG_SYS_64BIT_LBA is enable Patrice Chotard
2024-12-03 9:46 ` Mattijs Korpershoek [this message]
2025-01-08 18:48 ` Patrick DELAUNAY
2025-01-31 7:56 ` Patrice CHOTARD
2024-11-29 12:27 ` [PATCH v1 2/6] arm: stm32mp: stm32prog: fix " Patrice Chotard
2025-01-08 18:48 ` Patrick DELAUNAY
2025-01-31 7:56 ` Patrice CHOTARD
2024-11-29 12:27 ` [PATCH v1 3/6] arm: stm32mp: stm32prog: update multiplier is part-size is above SZ_1G Patrice Chotard
2025-01-08 18:49 ` Patrick DELAUNAY
2025-01-31 7:56 ` Patrice CHOTARD
2024-11-29 12:27 ` [PATCH v1 4/6] configs: stm32mp13: enable CONFIG_SYS_64BIT_LBA Patrice Chotard
2025-01-08 18:49 ` Patrick DELAUNAY
2025-01-31 7:57 ` Patrice CHOTARD
2024-11-29 12:27 ` [PATCH v1 5/6] configs: stm32mp15: " Patrice Chotard
2025-01-08 18:49 ` Patrick DELAUNAY
2025-01-31 7:57 ` Patrice CHOTARD
2024-11-29 12:27 ` [PATCH v1 6/6] configs: stm32mp25: " Patrice Chotard
2025-01-08 18:50 ` Patrick DELAUNAY
2025-01-08 21:12 ` Heinrich Schuchardt
2025-01-31 7:57 ` Patrice CHOTARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734j5p096.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-stm32@st-md-mailman.stormreply.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox