Skip to contentSkip to conversation

MIPS: fix build with gcc-12

PATCH New Sudip Mukherjee 1 participant 1 message May 14, 2022 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: fix build with gcc-12

Some mips builds with gcc-12 fails with the error:
arch/mips/jz4740/setup.c:64:25: error: comparison between two arrays
[-Werror=array-compare]
64 | if (__dtb_start != __dtb_end)

'd24f48767d5e ("MIPS: Use address-of operator on section symbols")' has been applied which fixes most of the error, but it missed one file which was not available upstream when the change was done.

Fixes d24f48767d5e ("MIPS: Use address-of operator on section symbols")
---
 arch/mips/jz4740/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/jz4740/setup.c +1 -1
index dc8ee21e0948e..45e327960a465 100644
@@ -61,7 +61,7 @@ void __init plat_mem_setup(void)
 
 	jz4740_reset_init();
 
-	if (__dtb_start != __dtb_end)
+	if (&__dtb_start != &__dtb_end)
 		dtb = __dtb_start;
 	else
 		dtb = (void *)fw_passed_dtb;
Signature · 1 line
2.30.2