* [PATCH 0/2] arm: mvebu: two simple cleanups
@ 2026-05-02 12:14 Martin Kaiser
2026-05-02 12:14 ` [PATCH 1/2] ARM: mvebu: drop unnecessary NULL check Martin Kaiser
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Martin Kaiser @ 2026-05-02 12:14 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement
Cc: linux-arm-kernel, linux-kernel, Martin Kaiser
Two small patches that simplify the devicetree parsing in
arch/arm/mach-mvebu/coherency.c.
Martin Kaiser (2):
ARM: mvebu: drop unnecessary NULL check
ARM: mvebu: simplify of_node_put calls
arch/arm/mach-mvebu/coherency.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
--
2.43.7
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] ARM: mvebu: drop unnecessary NULL check
2026-05-02 12:14 [PATCH 0/2] arm: mvebu: two simple cleanups Martin Kaiser
@ 2026-05-02 12:14 ` Martin Kaiser
2026-05-02 12:14 ` [PATCH 2/2] ARM: mvebu: simplify of_node_put calls Martin Kaiser
2026-06-01 6:36 ` [PATCH 0/2] arm: mvebu: two simple cleanups Gregory CLEMENT
2 siblings, 0 replies; 4+ messages in thread
From: Martin Kaiser @ 2026-05-02 12:14 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement
Cc: linux-arm-kernel, linux-kernel, Martin Kaiser
Don't check the returned pointer from of_find_compatible_node.
We pass this pointer to of_iomap, which handles np==NULL correctly.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
arch/arm/mach-mvebu/coherency.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index fa2c1e1aeb96..a8288a29c1f5 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -133,8 +133,6 @@ static void __init armada_370_coherency_init(struct device_node *np)
cpu_config_np = of_find_compatible_node(NULL, NULL,
"marvell,armada-xp-cpu-config");
- if (!cpu_config_np)
- goto exit;
cpu_config_base = of_iomap(cpu_config_np, 0);
if (!cpu_config_base) {
--
2.43.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ARM: mvebu: simplify of_node_put calls
2026-05-02 12:14 [PATCH 0/2] arm: mvebu: two simple cleanups Martin Kaiser
2026-05-02 12:14 ` [PATCH 1/2] ARM: mvebu: drop unnecessary NULL check Martin Kaiser
@ 2026-05-02 12:14 ` Martin Kaiser
2026-06-01 6:36 ` [PATCH 0/2] arm: mvebu: two simple cleanups Gregory CLEMENT
2 siblings, 0 replies; 4+ messages in thread
From: Martin Kaiser @ 2026-05-02 12:14 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement
Cc: linux-arm-kernel, linux-kernel, Martin Kaiser
In armada_370_coherency_init, cpu_config_np is no longer needed after
of_iomap. We can call of_node_put earlier and summarize the two calls.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
arch/arm/mach-mvebu/coherency.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index a8288a29c1f5..f27b4ec13df2 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -135,12 +135,9 @@ static void __init armada_370_coherency_init(struct device_node *np)
"marvell,armada-xp-cpu-config");
cpu_config_base = of_iomap(cpu_config_np, 0);
- if (!cpu_config_base) {
- of_node_put(cpu_config_np);
- goto exit;
- }
-
of_node_put(cpu_config_np);
+ if (!cpu_config_base)
+ goto exit;
cpuhp_setup_state_nocalls(CPUHP_AP_ARM_MVEBU_COHERENCY,
"arm/mvebu/coherency:starting",
--
2.43.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] arm: mvebu: two simple cleanups
2026-05-02 12:14 [PATCH 0/2] arm: mvebu: two simple cleanups Martin Kaiser
2026-05-02 12:14 ` [PATCH 1/2] ARM: mvebu: drop unnecessary NULL check Martin Kaiser
2026-05-02 12:14 ` [PATCH 2/2] ARM: mvebu: simplify of_node_put calls Martin Kaiser
@ 2026-06-01 6:36 ` Gregory CLEMENT
2 siblings, 0 replies; 4+ messages in thread
From: Gregory CLEMENT @ 2026-06-01 6:36 UTC (permalink / raw)
To: Martin Kaiser, Andrew Lunn; +Cc: linux-arm-kernel, linux-kernel, Martin Kaiser
Martin Kaiser <martin@kaiser.cx> writes:
> Two small patches that simplify the devicetree parsing in
> arch/arm/mach-mvebu/coherency.c.
>
> Martin Kaiser (2):
> ARM: mvebu: drop unnecessary NULL check
> ARM: mvebu: simplify of_node_put calls
>
Applied on mvebu/arm
Thanks,
Gregory
> arch/arm/mach-mvebu/coherency.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> --
> 2.43.7
>
--
Grégory CLEMENT, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-01 6:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-02 12:14 [PATCH 0/2] arm: mvebu: two simple cleanups Martin Kaiser
2026-05-02 12:14 ` [PATCH 1/2] ARM: mvebu: drop unnecessary NULL check Martin Kaiser
2026-05-02 12:14 ` [PATCH 2/2] ARM: mvebu: simplify of_node_put calls Martin Kaiser
2026-06-01 6:36 ` [PATCH 0/2] arm: mvebu: two simple cleanups Gregory CLEMENT
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.