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: <mseepzvfqeyaj6kr566gy64ciggetdt2bcu4seh6nc5jkrkegw@plfzuinpgx3w>
Date: Mon, 5 Jan 2026 10:41:35 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>
Cc: Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>, 
	Stephen Boyd <sboyd@...nel.org>, linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] OPP: of: Simplify with scoped for each OF child loop

On 02-01-26, 13:49, Krzysztof Kozlowski wrote:
> Use scoped for-each loop when iterating over device nodes to make code a
> bit simpler.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>
> ---
>  drivers/opp/of.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/opp/of.c b/drivers/opp/of.c
> index 1e0d0adb18e1..a268c2b250c0 100644
> --- a/drivers/opp/of.c
> +++ b/drivers/opp/of.c
> @@ -956,7 +956,6 @@ static struct dev_pm_opp *_opp_add_static_v2(struct opp_table *opp_table,
>  /* Initializes OPP tables based on new bindings */
>  static int _of_add_opp_table_v2(struct device *dev, struct opp_table *opp_table)
>  {
> -	struct device_node *np;
>  	int ret, count = 0;
>  	struct dev_pm_opp *opp;
>  
> @@ -971,13 +970,12 @@ static int _of_add_opp_table_v2(struct device *dev, struct opp_table *opp_table)
>  	}
>  
>  	/* We have opp-table node now, iterate over it and add OPPs */
> -	for_each_available_child_of_node(opp_table->np, np) {
> +	for_each_available_child_of_node_scoped(opp_table->np, np) {
>  		opp = _opp_add_static_v2(opp_table, dev, np);
>  		if (IS_ERR(opp)) {
>  			ret = PTR_ERR(opp);
>  			dev_err(dev, "%s: Failed to add OPP, %d\n", __func__,
>  				ret);
> -			of_node_put(np);
>  			goto remove_static_opp;
>  		} else if (opp) {
>  			count++;

Applied. Thanks.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ