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: <ZF4FVBcnWlvKF_DP@hovoldconsulting.com>
Date:   Fri, 12 May 2023 11:22:28 +0200
From:   Johan Hovold <johan@...nel.org>
To:     Bjorn Andersson <quic_bjorande@...cinc.com>
Cc:     Vinod Koul <vkoul@...nel.org>,
        Kishon Vijay Abraham I <kishon@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-arm-msm@...r.kernel.org, linux-phy@...ts.infradead.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Neil Armstrong <neil.armstrong@...aro.org>,
        Abel Vesa <abel.vesa@...aro.org>,
        Steev Klimaszewski <steev@...i.org>,
        Johan Hovold <johan+linaro@...nel.org>
Subject: Re: [PATCH v2 4/8] phy: qcom-qmp-combo: Introduce orientation
 variable

On Tue, May 09, 2023 at 08:19:26PM -0700, Bjorn Andersson wrote:
> In multiple places throughout the driver code has been written in
> prepration for handling of orientation switching.
> 
> Introduce a typec_orientation in qmp_combo and fill out the various
> "placeholders" with the associated logic. By initializing the
> orientation to "normal" this change has no functional impact, but
> reduces the size of the upcoming introduction of dynamic orientation
> switching.
> 
> Signed-off-by: Bjorn Andersson <quic_bjorande@...cinc.com>
> Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>
> Tested-by: Abel Vesa <abel.vesa@...aro.org>
> Tested-by: Steev Klimaszewski <steev@...i.org>
> Tested-by: Neil Armstrong <neil.armstrong@...aro.org> # on HDK8450
> Tested-by: Johan Hovold <johan+linaro@...nel.org>	# X13s
> ---
> 
> Changes since v1:
> - X-mas in qmp_combo_configure_dp_mode()
> 
>  drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 54 +++++++++++++----------
>  1 file changed, 30 insertions(+), 24 deletions(-)
 
>  static bool qmp_combo_configure_dp_mode(struct qmp_combo *qmp)
>  {
> +	bool reverse = qmp->orientation == TYPEC_ORIENTATION_REVERSE;

Nit: I still think parentheses around the right-hand side would improve
readability.

> +	const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
>  	u32 val;
> -	bool reverse = false;

> @@ -2235,7 +2236,7 @@ static int qmp_v4_configure_dp_phy(struct qmp_combo *qmp)
>  {
>  	const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
>  	u32 bias0_en, drvr0_en, bias1_en, drvr1_en;
> -	bool reverse = false;
> +	bool reverse = qmp->orientation == TYPEC_ORIENTATION_REVERSE;

Same here and below.

And maintaining reverse xmas style throughout the driver would be nice
for consistency too.

>  	u32 status;
>  	int ret;

Looks good otherwise:

Reviewed-by: Johan Hovold <johan+linaro@...nel.org>

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ