lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yu1Y1nDCyzKhJUAI@google.com>
Date:   Fri, 5 Aug 2022 10:52:22 -0700
From:   Matthias Kaehlcke <mka@...omium.org>
To:     Johan Hovold <johan+linaro@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Felipe Balbi <balbi@...nel.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Konrad Dybcio <konrad.dybcio@...ainline.org>,
        linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] usb: dwc3: qcom: clean up icc init

On Fri, Aug 05, 2022 at 09:45:00AM +0200, Johan Hovold wrote:
> Clean up the interconnect-initialisation helper by increasing
> indentation of (or merging) continuation lines and adding brackets
> around multi-line blocks in order to improve readability.
> 
> Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
> ---
>  drivers/usb/dwc3/dwc3-qcom.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index 196efa9f2545..f2ff4fe1490a 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -253,7 +253,7 @@ static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom)
>  	qcom->icc_path_ddr = of_icc_get(dev, "usb-ddr");
>  	if (IS_ERR(qcom->icc_path_ddr)) {
>  		dev_err(dev, "failed to get usb-ddr path: %ld\n",
> -			PTR_ERR(qcom->icc_path_ddr));
> +				PTR_ERR(qcom->icc_path_ddr));

What's wrong with the existing indentation? It looks similar to the indentation
changes you do below for icc_set_bw().

Maybe your preference is double indentation for continuation lines rather than
aligning them roughly with the opening parenthesis of the calling function?

>  		return PTR_ERR(qcom->icc_path_ddr);
>  	}
>  
> @@ -265,20 +265,19 @@ static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom)
>  	}
>  
>  	max_speed = usb_get_maximum_speed(&qcom->dwc3->dev);
> -	if (max_speed >= USB_SPEED_SUPER || max_speed == USB_SPEED_UNKNOWN)
> +	if (max_speed >= USB_SPEED_SUPER || max_speed == USB_SPEED_UNKNOWN) {
>  		ret = icc_set_bw(qcom->icc_path_ddr,
> -			USB_MEMORY_AVG_SS_BW, USB_MEMORY_PEAK_SS_BW);
> -	else
> +				USB_MEMORY_AVG_SS_BW, USB_MEMORY_PEAK_SS_BW);
> +	} else {
>  		ret = icc_set_bw(qcom->icc_path_ddr,
> -			USB_MEMORY_AVG_HS_BW, USB_MEMORY_PEAK_HS_BW);
> -
> +				USB_MEMORY_AVG_HS_BW, USB_MEMORY_PEAK_HS_BW);
> +	}
>  	if (ret) {
>  		dev_err(dev, "failed to set bandwidth for usb-ddr path: %d\n", ret);
>  		return ret;
>  	}
>  
> -	ret = icc_set_bw(qcom->icc_path_apps,
> -		APPS_USB_AVG_BW, APPS_USB_PEAK_BW);
> +	ret = icc_set_bw(qcom->icc_path_apps, APPS_USB_AVG_BW, APPS_USB_PEAK_BW);
>  	if (ret) {
>  		dev_err(dev, "failed to set bandwidth for apps-usb path: %d\n", ret);
>  		return ret;

Reviewed-by: Matthias Kaehlcke <mka@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ