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] [day] [month] [year] [list]
Message-ID: <06b8e94f-0724-4a8e-bdcd-83e08faa7673@foss.st.com>
Date: Mon, 13 Jan 2025 09:25:07 +0100
From: Patrice CHOTARD <patrice.chotard@...s.st.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Bjorn Andersson
	<andersson@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>
CC: <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 5/5] remoteproc: st: Use
 syscon_regmap_lookup_by_phandle_args



On 1/11/25 19:42, Krzysztof Kozlowski wrote:
> Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over
> syscon_regmap_lookup_by_phandle() and getting the argument.  Except
> simpler code this annotates within one line that given phandle has
> arguments, so grepping for code would be easier.
> 
> There is also no real benefit in printing errors on missing syscon
> argument, because this is done just too late: runtime check on
> static/build-time data.  Dtschema and Devicetree bindings offer the
> static/build-time check for this already.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
>  drivers/remoteproc/st_remoteproc.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c
> index d1f35e8a83ba525613ed4e54d2269b7e9f427e46..e6566a9839dc5ffc83d907a3076fc4b0a644138a 100644
> --- a/drivers/remoteproc/st_remoteproc.c
> +++ b/drivers/remoteproc/st_remoteproc.c
> @@ -314,18 +314,12 @@ static int st_rproc_parse_dt(struct platform_device *pdev)
>  		return err;
>  	}
>  
> -	ddata->boot_base = syscon_regmap_lookup_by_phandle(np, "st,syscfg");
> +	ddata->boot_base = syscon_regmap_lookup_by_phandle_args(np, "st,syscfg",
> +								1, &ddata->boot_offset);
>  	if (IS_ERR(ddata->boot_base))
>  		return dev_err_probe(dev, PTR_ERR(ddata->boot_base),
>  				     "Boot base not found\n");
>  
> -	err = of_property_read_u32_index(np, "st,syscfg", 1,
> -					 &ddata->boot_offset);
> -	if (err) {
> -		dev_err(dev, "Boot offset not found\n");
> -		return -EINVAL;
> -	}
> -
>  	err = clk_prepare(ddata->clk);
>  	if (err)
>  		dev_err(dev, "failed to get clock\n");
> 

Reviewed-by: Patrice Chotard <patrice.chotard@...s.st.com>

Thanks
Patrice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ