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: <29f6e66d-d093-8d65-bf88-046dca5f0dcf@linaro.org>
Date:   Mon, 3 Jul 2023 17:31:38 +0300
From:   Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To:     Konrad Dybcio <konrad.dybcio@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andi Shyti <andi.shyti@...nel.org>
Cc:     Marijn Suijten <marijn.suijten@...ainline.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        linux-arm-msm@...r.kernel.org, linux-spi@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-serial@...r.kernel.org, linux-i2c@...r.kernel.org
Subject: Re: [PATCH 4/5] soc: qcom: geni-se: Allow any combination of icc
 paths

On 03/07/2023 16:31, Konrad Dybcio wrote:
> Not all SoCs provide all the usual paths. By the looks of it, at least
> SM8150 and SM8250 don't have one that would resemble "qup-core".
> 
> Check for the error that icc_get throws and assign a NULL value to each
> path that can't be found to effectively allow any combination of icc paths
> (which, like previously, includes no icc paths). The ICC APIs gracefully
> handle a NULL path by exiting early.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> ---
>   drivers/soc/qcom/qcom-geni-se.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
> index ba788762835f..a5e2e8925c8e 100644
> --- a/drivers/soc/qcom/qcom-geni-se.c
> +++ b/drivers/soc/qcom/qcom-geni-se.c
> @@ -813,8 +813,13 @@ int geni_icc_get(struct geni_se *se, const char *icc_ddr)
>   			continue;
>   
>   		se->icc_paths[i].path = devm_of_icc_get(se->dev, icc_names[i]);

Would it make sense to add (devm_)of_icc_get_optional instead?  I think 
we already have several usecases for such API call

For this patch:

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>

> -		if (IS_ERR(se->icc_paths[i].path))
> -			goto err;
> +		if (IS_ERR(se->icc_paths[i].path)) {
> +			/* Not all SoCs implement all the paths */
> +			if (PTR_ERR(se->icc_paths[i].path) == -ENODATA)
> +				se->icc_paths[i].path = NULL;
> +			else
> +				goto err;
> +		}
>   	}
>   
>   	return 0;
> 

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ