From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] MIPS: bootm: fix format string type mismatch
Date: Tue, 12 Sep 2023 12:56:58 +0200 [thread overview]
Message-ID: <20230912105658.GC637806@pengutronix.de> (raw)
In-Reply-To: <20230912095809.287289-1-a.fatoum@pengutronix.de>
On Tue, Sep 12, 2023 at 11:58:09AM +0200, Ahmad Fatoum wrote:
> While we always have sizeof (struct device_node *) == sizeof(ulong),
> clangd warns about mixing them as arguments to functions with printf-style
> format strings. Add a cast to silence the warning.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/mips/lib/bootm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
> index 19d82ec37530..a5bfc6c88c17 100644
> --- a/arch/mips/lib/bootm.c
> +++ b/arch/mips/lib/bootm.c
> @@ -62,7 +62,7 @@ static int do_bootm_elf(struct image_data *data)
> }
>
> pr_info("Starting application at 0x%08lx, dts 0x%08lx...\n",
> - data->os_address, data->of_root_node);
> + data->os_address, (ulong)data->of_root_node);
It's a pointer, so why not print it with 0x%p?
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2023-09-12 10:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 9:58 Ahmad Fatoum
2023-09-12 10:56 ` Sascha Hauer [this message]
2023-09-12 11:00 ` Ahmad Fatoum
2023-09-12 11:12 ` Sascha Hauer
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=20230912105658.GC637806@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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