[PATCH 1/1] powerpc: fix fdt_fixup_liodn_tbl_fman()

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Wed Oct 12 19:13:11 CEST 2022


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 at canonical.com>
---
 arch/powerpc/cpu/mpc85xx/liodn.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/liodn.c b/arch/powerpc/cpu/mpc85xx/liodn.c
index a084002494..2d55916841 100644
--- a/arch/powerpc/cpu/mpc85xx/liodn.c
+++ b/arch/powerpc/cpu/mpc85xx/liodn.c
@@ -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.
 		 */
-- 
2.37.2



More information about the U-Boot mailing list