diff mbox

[U-Boot,01/12] ls2080aqds: eth: add missing braces

Message ID 1479257416-29389-2-git-send-email-andre.przywara@arm.com
State Superseded
Delegated to: York Sun
Headers show

Commit Message

Andre Przywara Nov. 16, 2016, 12:50 a.m. UTC
The whole error message should be within the else clause, not just
the first part.
Pointed out by GCC 6.2's -Wmisleading-indentation warning.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 board/freescale/ls2080aqds/eth.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

York Sun Nov. 16, 2016, 6 p.m. UTC | #1
On 11/15/2016 04:52 PM, Andre Przywara wrote:
> The whole error message should be within the else clause, not just
> the first part.
> Pointed out by GCC 6.2's -Wmisleading-indentation warning.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  board/freescale/ls2080aqds/eth.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c
> index 95ff68b..7bf7a5b 100644
> --- a/board/freescale/ls2080aqds/eth.c
> +++ b/board/freescale/ls2080aqds/eth.c
> @@ -196,12 +196,13 @@ static void sgmii_configure_repeater(int serdes_port)
>  					       value);
>  					i = 5;
>  					j = 5;
> -				} else
> +				} else {
>  					printf("DPMAC %d :PHY is failed to ",
>  					       dpmac_id);
>  					printf("configure the repeater 0x%x\n",
>  					       value);
>  				}
> +			}
>  		}
>  	}
>  error:
>

Thanks for finding this. This is being addressed by 
http://patchwork.ozlabs.org/patch/682885/. Currently in my test queue.

York
diff mbox

Patch

diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c
index 95ff68b..7bf7a5b 100644
--- a/board/freescale/ls2080aqds/eth.c
+++ b/board/freescale/ls2080aqds/eth.c
@@ -196,12 +196,13 @@  static void sgmii_configure_repeater(int serdes_port)
 					       value);
 					i = 5;
 					j = 5;
-				} else
+				} else {
 					printf("DPMAC %d :PHY is failed to ",
 					       dpmac_id);
 					printf("configure the repeater 0x%x\n",
 					       value);
 				}
+			}
 		}
 	}
 error: