MIPS: fix build with gcc-12
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Sat, 14 May 2022 15:47:30 +0000 (16:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 May 2022 07:47:28 +0000 (09:47 +0200)
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")
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/jz4740/setup.c

index dc8ee21e0948ec1855e3df9e0ca5c82f38bc7309..45e327960a465dab729626e2630123599637c1ab 100644 (file)
@@ -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;