]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
powerpc: fix fdt_fixup_liodn_tbl_fman()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 12 Oct 2022 17:13:11 +0000 (19:13 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 6 Dec 2022 20:30:30 +0000 (15:30 -0500)
Builiding with GCC 12.2 fails:

    arch/powerpc/cpu/mpc85xx/liodn.c: In function 'fdt_fixup_liodn_tbl_fman':
    arch/powerpc/cpu/mpc85xx/liodn.c:340:35: error: the comparison will
    always evaluate as 'false' for the address of 'compat'
    will never be NULL [-Werror=address]
      340 |                 if (tbl[i].compat == NULL)
          |

Remove the superfluous check.

Fixes: 97a8d010e029 ("net/fman: Support both new and legacy FMan Compatibles")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
arch/powerpc/cpu/mpc85xx/liodn.c

index d5df02d39d8225229c1da3d2a950af3d60c21d70..18790921dd724862c0dfc213675de2bb2897013e 100644 (file)
@@ -337,9 +337,6 @@ static void fdt_fixup_liodn_tbl_fman(void *blob,
        for (i = 0; i < sz; i++) {
                int off;
 
-               if (tbl[i].compat == NULL)
-                       continue;
-
                /* Try the new compatible first.
                 * If the node is missing, try the old.
                 */