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: <48faa7b1-d486-406a-a8c4-a1c9609e7fc6@kernel.org>
Date: Fri, 9 Jan 2026 18:21:47 +0100
From: "Christophe Leroy (CS GROUP)" <chleroy@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>,
 Miguel Ojeda <ojeda@...nel.org>, Rob Herring <robh@...nel.org>,
 Saravana Kannan <saravanak@...gle.com>, Nathan Chancellor
 <nathan@...nel.org>, Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
 Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
 Russell King <linux@...linux.org.uk>,
 Nicolas Ferre <nicolas.ferre@...rochip.com>,
 Alexandre Belloni <alexandre.belloni@...tlin.com>,
 Claudiu Beznea <claudiu.beznea@...on.dev>,
 Krzysztof Kozlowski <krzk@...nel.org>, Alim Akhtar
 <alim.akhtar@...sung.com>, Madhavan Srinivasan <maddy@...ux.ibm.com>,
 Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
 Nipun Gupta <nipun.gupta@....com>, Nikhil Agarwal <nikhil.agarwal@....com>,
 Abel Vesa <abelvesa@...nel.org>, Peng Fan <peng.fan@....com>,
 Michael Turquette <mturquette@...libre.com>, Stephen Boyd
 <sboyd@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
 Sascha Hauer <s.hauer@...gutronix.de>,
 Pengutronix Kernel Team <kernel@...gutronix.de>,
 Fabio Estevam <festevam@...il.com>, Vinod Koul <vkoul@...nel.org>,
 Sylwester Nawrocki <s.nawrocki@...sung.com>,
 Mauro Carvalho Chehab <mchehab@...nel.org>,
 "Rafael J. Wysocki" <rafael@...nel.org>,
 Viresh Kumar <viresh.kumar@...aro.org>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
 llvm@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
 linux-samsung-soc@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
 linux-clk@...r.kernel.org, imx@...ts.linux.dev, dmaengine@...r.kernel.org,
 linux-media@...r.kernel.org, linux-pm@...r.kernel.org,
 Jonathan Cameron <jonathan.cameron@...wei.com>
Subject: Re: [PATCH v3 04/12] powerpc/fsp2: Simplify with scoped for each OF
 child loop



Le 09/01/2026 à 17:57, Krzysztof Kozlowski a écrit :
> Use scoped for-each loop when iterating over device nodes to make code a
> bit simpler.
> 
> Reviewed-by: Jonathan Cameron <jonathan.cameron@...wei.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>

Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@...nel.org>

> ---
> 
> Depends on the first patch.
> ---
>   arch/powerpc/platforms/44x/fsp2.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/44x/fsp2.c b/arch/powerpc/platforms/44x/fsp2.c
> index f6b8d02e08b0..b06d9220844c 100644
> --- a/arch/powerpc/platforms/44x/fsp2.c
> +++ b/arch/powerpc/platforms/44x/fsp2.c
> @@ -199,16 +199,14 @@ static irqreturn_t rst_wrn_handler(int irq, void *data) {
>   
>   static void __init node_irq_request(const char *compat, irq_handler_t errirq_handler)
>   {
> -	struct device_node *np;
>   	unsigned int irq;
>   	int32_t rc;
>   
> -	for_each_compatible_node(np, NULL, compat) {
> +	for_each_compatible_node_scoped(np, NULL, compat) {
>   		irq = irq_of_parse_and_map(np, 0);
>   		if (!irq) {
>   			pr_err("device tree node %pOFn is missing a interrupt",
>   			      np);
> -			of_node_put(np);
>   			return;
>   		}
>   
> @@ -216,7 +214,6 @@ static void __init node_irq_request(const char *compat, irq_handler_t errirq_han
>   		if (rc) {
>   			pr_err("fsp_of_probe: request_irq failed: np=%pOF rc=%d",
>   			      np, rc);
> -			of_node_put(np);
>   			return;
>   		}
>   	}
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ