From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Pali Rohár" <pali@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"Tyrel Datwyler" <tyreld@linux.ibm.com>,
linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
LKML <linux-kernel@vger.kernel.org>,
linuxppc-dev@lists.ozlabs.org,
"Jonathan Cameron" <jonathan.cameron@huawei.com>
Subject: Re: [PATCH v2 4/4] PCI: rpaphp: Simplify with scoped for each OF child loop
Date: Tue, 17 Mar 2026 17:26:22 +0200 (EET) [thread overview]
Message-ID: <b983a05b-2d90-2a88-4b60-49c6c5ee777d@linux.intel.com> (raw)
In-Reply-To: <20260317133322.266102-8-krzysztof.kozlowski@oss.qualcomm.com>
[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]
On Tue, 17 Mar 2026, Krzysztof Kozlowski wrote:
> Use scoped for-each loop when iterating over device nodes to make code a
> bit simpler.
>
> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
>
> ---
>
> Changes in v2:
> Tags
> ---
> drivers/pci/hotplug/rpaphp_slot.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c
> index 33ca19200c1b..67362e5b9971 100644
> --- a/drivers/pci/hotplug/rpaphp_slot.c
> +++ b/drivers/pci/hotplug/rpaphp_slot.c
> @@ -82,7 +82,6 @@ EXPORT_SYMBOL_GPL(rpaphp_deregister_slot);
> int rpaphp_register_slot(struct slot *slot)
> {
> struct hotplug_slot *php_slot = &slot->hotplug_slot;
> - struct device_node *child;
> u32 my_index;
> int retval;
> int slotno = -1;
> @@ -97,11 +96,10 @@ int rpaphp_register_slot(struct slot *slot)
> return -EAGAIN;
> }
>
> - for_each_child_of_node(slot->dn, child) {
> + for_each_child_of_node_scoped(slot->dn, child) {
> retval = of_property_read_u32(child, "ibm,my-drc-index", &my_index);
> if (my_index == slot->index) {
> slotno = PCI_SLOT(PCI_DN(child)->devfn);
> - of_node_put(child);
> break;
> }
> }
>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
prev parent reply other threads:[~2026-03-17 15:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 13:33 [PATCH v2 1/4] PCI: mvebu: Simplify with scoped for each OF child loop Krzysztof Kozlowski
2026-03-17 13:33 ` [PATCH v2 2/4] PCI: mvebu: Keep child node refcnt for probe duration Krzysztof Kozlowski
2026-03-17 13:33 ` [PATCH v2 3/4] PCI: pnv_php: Simplify with scoped for each OF child loop Krzysztof Kozlowski
2026-03-17 15:25 ` Ilpo Järvinen
2026-03-17 21:20 ` Bjorn Helgaas
2026-03-17 13:33 ` [PATCH v2 4/4] PCI: rpaphp: " Krzysztof Kozlowski
2026-03-17 15:26 ` Ilpo Järvinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b983a05b-2d90-2a88-4b60-49c6c5ee777d@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=chleroy@kernel.org \
--cc=jonathan.cameron@huawei.com \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lpieralisi@kernel.org \
--cc=maddy@linux.ibm.com \
--cc=mani@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=pali@kernel.org \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=tyreld@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox