Re: [PATCH 1/2] libfdt: Suppress a unused parameter warning in overlay_fixup_one_phandle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sat, Nov 16, 2024 at 06:12:27PM +0800, Bingwu Zhang wrote:
> From: Bingwu Zhang <xtexchooser@xxxxxxxx>
> 
> 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@xxxxxxxx>

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: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux