From: David Gibson <david@gibson.dropbear.id.au>
To: Bingwu Zhang <xtex@envs.net>
Cc: devicetree-compiler@vger.kernel.org,
Bingwu Zhang <xtexchooser@duck.com>,
devicetree@vger.kernel.org, ~xtex/staging@lists.sr.ht
Subject: Re: [PATCH 1/2] libfdt: Suppress a unused parameter warning in overlay_fixup_one_phandle
Date: Mon, 18 Nov 2024 14:25:52 +1100 [thread overview]
Message-ID: <ZzqzwCBrSPVhYIwe@zatzit> (raw)
In-Reply-To: <20241116101228.164707-5-xtex@envs.net>
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
On Sat, Nov 16, 2024 at 06:12:27PM +0800, Bingwu Zhang wrote:
> From: Bingwu Zhang <xtexchooser@duck.com>
>
> When compiling with -Wall -Wextra, the unused fdt parameter becomes a
> warning. With -Werror, it becomes an error that fails the build.
>
> Thanks to Icenowy Zheng for pointing out the solution.
>
> Signed-off-by: Bingwu Zhang <xtexchooser@duck.com>
AFAICT this parameter is *really* unused, it's not just the compiled
being confused. So I'd prefer to actually remove the parameter,
rather than suppress the warning.
> ---
> libfdt/fdt_overlay.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
> index 28b667ffc490..f9be13865807 100644
> --- a/libfdt/fdt_overlay.c
> +++ b/libfdt/fdt_overlay.c
> @@ -334,6 +334,7 @@ static int overlay_fixup_one_phandle(void *fdt, void *fdto,
> const char *name, uint32_t name_len,
> int poffset, uint32_t phandle)
> {
> + (void)fdt;
> fdt32_t phandle_prop;
> int fixup_off;
>
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-11-18 3:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 10:12 [PATCH 0/2] libfdt: Fix -Wextra -Wpedantic warnings Bingwu Zhang
2024-11-16 10:12 ` [PATCH 1/2] libfdt: Suppress a unused parameter warning in overlay_fixup_one_phandle Bingwu Zhang
2024-11-18 3:25 ` David Gibson [this message]
2024-11-18 10:15 ` xtex
2024-11-18 10:15 ` xtex
2024-11-16 10:12 ` [PATCH 2/2] libfdt: Remove extra semi-colons outside functions Bingwu Zhang
2024-11-18 3:32 ` David Gibson
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=ZzqzwCBrSPVhYIwe@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=devicetree-compiler@vger.kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=xtex@envs.net \
--cc=xtexchooser@duck.com \
--cc=~xtex/staging@lists.sr.ht \
/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;
as well as URLs for NNTP newsgroup(s).