From: Yuho Choi <dbgh9129@gmail.com>
To: "Andreas Färber" <afaerber@suse.de>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Russell King" <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org,
Yuho Choi <dbgh9129@gmail.com>
Subject: [PATCH v1] ARM: actions: Drop OF node references after mapping
Date: Mon, 8 Jun 2026 11:46:58 -0400 [thread overview]
Message-ID: <20260608154659.37726-1-dbgh9129@gmail.com> (raw)
of_find_compatible_node() returns a device node with its reference
count incremented. of_iomap() uses the node to map the register range,
but does not consume that reference.
Drop the node references after mapping the timer, SPS and SCU
registers in s500_smp_prepare_cpus().
Fixes: 172067e0bc87 ("ARM: owl: Implement CPU enable-method for S500")
Fixes: b6a0e18ca690 ("ARM: owl: smp: Implement SPS power-gating for CPU2 and CPU3")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
---
arch/arm/mach-actions/platsmp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-actions/platsmp.c b/arch/arm/mach-actions/platsmp.c
index 7b208e96fbb6..a0d0c1621bd0 100644
--- a/arch/arm/mach-actions/platsmp.c
+++ b/arch/arm/mach-actions/platsmp.c
@@ -105,6 +105,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
}
timer_base_addr = of_iomap(node, 0);
+ of_node_put(node);
if (!timer_base_addr) {
pr_err("%s: could not map timer registers\n", __func__);
return;
@@ -117,6 +118,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
}
sps_base_addr = of_iomap(node, 0);
+ of_node_put(node);
if (!sps_base_addr) {
pr_err("%s: could not map sps registers\n", __func__);
return;
@@ -130,6 +132,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
}
scu_base_addr = of_iomap(node, 0);
+ of_node_put(node);
if (!scu_base_addr) {
pr_err("%s: could not map scu registers\n", __func__);
return;
--
2.43.0
reply other threads:[~2026-06-08 15:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260608154659.37726-1-dbgh9129@gmail.com \
--to=dbgh9129@gmail.com \
--cc=afaerber@suse.de \
--cc=linux-actions@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mani@kernel.org \
/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