[PATCH] mach-k3: common_fdt: Fix Label Issue

Tom Rini trini at konsulko.com
Tue Apr 15 00:59:11 CEST 2025


On Sun, Apr 06, 2025 at 11:07:11PM -0700, Daniel Schultz wrote:
> Labels are not allowed before declarations. Add a semicolon after the
> label to introduce an empty statement. This will fix following error:
> 
> arch/arm/mach-k3/common_fdt.c: In function 'fdt_fixup_reserved':
> arch/arm/mach-k3/common_fdt.c:156:2: error: a label can only be part of a statement and a declaration is not a statement
>   156 |  struct fdt_memory carveout = {
>       |  ^~~~~~
> make[1]: *** [scripts/Makefile.build:256: arch/arm/mach-k3/common_fdt.o] Error 1
> make: *** [Makefile:1919: arch/arm/mach-k3] Error 2
> 
> Fixes: 096aa229a9e ("mach-k3: common_fdt: create a reserved memory node")
> 
> Signed-off-by: Daniel Schultz <d.schultz at phytec.de>
> ---
> 
> I'm open to other suggestions! This is just the easiest way to fix this
> compile error. BTW, master is fine since 096aa229a9e is only on next.

Is this the only warning you get with Ubuntu 20.04's gcc? But I would
also rather see Udit's suggestion on how to fix it rather than adding a
';' here as that looks like a stray character rather than an intentional
but not always obvious fix. Thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250414/5db8ab51/attachment.sig>


More information about the U-Boot mailing list