]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
socrates: Fix a misleading indentation warning
authorTom Rini <trini@konsulko.com>
Tue, 9 May 2017 02:14:19 +0000 (22:14 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 12 May 2017 12:37:22 +0000 (08:37 -0400)
With gcc-6 and later we see a warning about the fact that we have a
construct of "if (test);\n\tstatement".  Upon reviewing the code, the
intention here is as the compiler suggests, we only want to execute the
indented statement if the test was true.

Cc: Sergei Poselenov <sposelenov@emcraft.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
board/socrates/socrates.c

index 8b34a80e8f72d0e44bf9d6682a1aa49d4e01c687..fb691c22d961862001f7a895793d10d74101d947 100644 (file)
@@ -378,7 +378,7 @@ static void board_backlight_brightness(int br)
 
                /* LEDs on */
                reg = in_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c));
-               if (!(reg & BACKLIGHT_ENABLE));
+               if (!(reg & BACKLIGHT_ENABLE))
                        out_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c),
                                 reg | BACKLIGHT_ENABLE);
        } else {