[PATCH v2 1/2] cmd: load: Fix code indentation

Michal Simek michal.simek at xilinx.com
Tue Dec 1 17:09:19 CET 2020



On 01. 12. 20 17:05, Michal Simek wrote:
> Reported by smatch like:
> cmd/load.c:228 read_record() warn: inconsistent indenting
> 
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
> 
> Changes in v2:
> - One } was missing. Get it back.
> 
>  arch/arm/dts/zynqmp.dtsi | 48 ++++++++--------------------------------
>  cmd/load.c               |  9 ++++----
>  2 files changed, 13 insertions(+), 44 deletions(-)
> 
> diff --git a/arch/arm/dts/zynqmp.dtsi b/arch/arm/dts/zynqmp.dtsi
> index 1634af0bd896..d5840ab8737e 100644
> --- a/arch/arm/dts/zynqmp.dtsi
> +++ b/arch/arm/dts/zynqmp.dtsi
> @@ -672,6 +672,15 @@
>  			power-domains = <&zynqmp_firmware PD_QSPI>;
>  		};
>  
> +		psgtr: phy at fd400000 {
> +			compatible = "xlnx,zynqmp-psgtr-v1.1";
> +			status = "disabled";
> +			reg = <0x0 0xfd400000 0x0 0x40000>,
> +			      <0x0 0xfd3d0000 0x0 0x1000>;
> +			reg-names = "serdes", "siou";
> +			#phy-cells = <4>;
> +		};
> +
>  		rtc: rtc at ffa60000 {
>  			compatible = "xlnx,zynqmp-rtc";
>  			status = "disabled";
> @@ -682,45 +691,6 @@
>  			calibration = <0x8000>;
>  		};
>  
> -		serdes: zynqmp_phy at fd400000 {
> -			compatible = "xlnx,zynqmp-psgtr";
> -			status = "disabled";
> -			reg = <0x0 0xfd400000 0x0 0x40000>,
> -			      <0x0 0xfd3d0000 0x0 0x1000>,
> -			      <0x0 0xff5e0000 0x0 0x1000>;
> -			reg-names = "serdes", "siou", "lpd";
> -			nvmem-cells = <&soc_revision>;
> -			nvmem-cell-names = "soc_revision";
> -			resets = <&zynqmp_reset ZYNQMP_RESET_SATA>,
> -				 <&zynqmp_reset ZYNQMP_RESET_USB0_CORERESET>,
> -				 <&zynqmp_reset ZYNQMP_RESET_USB1_CORERESET>,
> -				 <&zynqmp_reset ZYNQMP_RESET_USB0_HIBERRESET>,
> -				 <&zynqmp_reset ZYNQMP_RESET_USB1_HIBERRESET>,
> -				 <&zynqmp_reset ZYNQMP_RESET_USB0_APB>,
> -				 <&zynqmp_reset ZYNQMP_RESET_USB1_APB>,
> -				 <&zynqmp_reset ZYNQMP_RESET_DP>,
> -				 <&zynqmp_reset ZYNQMP_RESET_GEM0>,
> -				 <&zynqmp_reset ZYNQMP_RESET_GEM1>,
> -				 <&zynqmp_reset ZYNQMP_RESET_GEM2>,
> -				 <&zynqmp_reset ZYNQMP_RESET_GEM3>;
> -			reset-names = "sata_rst", "usb0_crst", "usb1_crst",
> -				      "usb0_hibrst", "usb1_hibrst", "usb0_apbrst",
> -				      "usb1_apbrst", "dp_rst", "gem0_rst",
> -				      "gem1_rst", "gem2_rst", "gem3_rst";
> -			lane0: lane0 {
> -				#phy-cells = <4>;
> -			};
> -			lane1: lane1 {
> -				#phy-cells = <4>;
> -			};
> -			lane2: lane2 {
> -				#phy-cells = <4>;
> -			};
> -			lane3: lane3 {
> -				#phy-cells = <4>;
> -			};
> -		};
> -
>  		sata: ahci at fd0c0000 {
>  			compatible = "ceva,ahci-1v84";
>  			status = "disabled";
> diff --git a/cmd/load.c b/cmd/load.c
> index 9a3a16979c71..c6a7cc465153 100644
> --- a/cmd/load.c
> +++ b/cmd/load.c
> @@ -228,12 +228,11 @@ static int read_record(char *buf, ulong len)
>  			*p = c;
>  		}
>  
> -	    /* Check for the console hangup (if any different from serial) */
> -	    if (gd->jt->getc != getchar) {
> -		if (ctrlc()) {
> -		    return (-1);
> +		/* Check for the console hangup (if any different from serial) */
> +		if (gd->jt->getc != getchar) {
> +			if (ctrlc())
> +				return (-1);
>  		}
> -	    }
>  	}
>  
>  	/* line too long - truncate */
> 

grrrr. Please ignore this series. I included stuff I didn't want to add
here.

M



More information about the U-Boot mailing list