realtek: fix gcc-12 build with -Werror=array-compare
authorBjørn Mork <bjorn@mork.no>
Sun, 19 Jun 2022 13:59:27 +0000 (15:59 +0200)
committerSander Vanheule <sander@svanheule.net>
Wed, 22 Jun 2022 16:37:40 +0000 (18:37 +0200)
Removing this gcc-12 error:

arch/mips/rtl838x/setup.c:64:30: error: comparison between two arrays [-Werror=array-compare]
   64 |         else if (__dtb_start != __dtb_end)

Signed-off-by: Bjørn Mork <bjorn@mork.no>
target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c

index 55419c7b0b7afe89dbc3d2d039eec9def9ae86a9..18c477eb0fe729b4c8f0ce1fe79aebdb3d4420c3 100644 (file)
@@ -61,7 +61,7 @@ void __init plat_mem_setup(void)
 
        if (fw_passed_dtb) /* UHI interface */
                dtb = (void *)fw_passed_dtb;
-       else if (__dtb_start != __dtb_end)
+       else if (&__dtb_start[0] != &__dtb_end[0])
                dtb = (void *)__dtb_start;
        else
                panic("no dtb found");