From e73bd62dd7de707ecbf0d326efcad6756c674da4 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Sat, 2 May 2026 14:14:26 +0200 Subject: [PATCH 1/4] ARM: mvebu: drop unnecessary NULL check 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 Signed-off-by: Gregory CLEMENT --- 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) { From 79c72baaae2322ee7ef2aef26d04250e580dccd9 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Sat, 2 May 2026 14:14:27 +0200 Subject: [PATCH 2/4] ARM: mvebu: simplify of_node_put calls 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 Signed-off-by: Gregory CLEMENT --- 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", From b2a4bd1ee306a9d9f53ab76f5f9fea1890e457f1 Mon Sep 17 00:00:00 2001 From: Ethan Nelson-Moore Date: Fri, 8 May 2026 19:27:43 -0700 Subject: [PATCH 3/4] arm: mvebu_v5_defconfig: remove stale MACH_LINKSTATION_LSCHL reference The legacy board file for MACH_LINKSTATION_LSCHL was removed in commit ecfe69639157 ("ARM: orion5x: remove legacy support of ls-chl") after it was converted to DT booting, but a reference to it remained in mvebu_v5_defconfig. Drop this unused code. Signed-off-by: Ethan Nelson-Moore Signed-off-by: Gregory CLEMENT --- arch/arm/configs/mvebu_v5_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/configs/mvebu_v5_defconfig b/arch/arm/configs/mvebu_v5_defconfig index d1742a7cae6a..c42e2a4f8bc1 100644 --- a/arch/arm/configs/mvebu_v5_defconfig +++ b/arch/arm/configs/mvebu_v5_defconfig @@ -15,7 +15,6 @@ CONFIG_MACH_DNS323=y CONFIG_MACH_TS209=y CONFIG_MACH_TERASTATION_PRO2=y CONFIG_MACH_LINKSTATION_PRO=y -CONFIG_MACH_LINKSTATION_LSCHL=y CONFIG_MACH_LINKSTATION_MINI=y CONFIG_MACH_TS409=y CONFIG_MACH_TS78XX=y From bf4ad3be0679460585ab17dbcf298d085cf23429 Mon Sep 17 00:00:00 2001 From: Ethan Nelson-Moore Date: Sat, 16 May 2026 19:37:20 -0700 Subject: [PATCH 4/4] ARM: orion5x: update board check in mss2_pci_init() to use the DT The mss2_pci_init() function contains a check for the ARM machine ID via the machine_is_mss2() macro. The board concerned now supports only FDT booting, which does not use machine IDs, and therefore the code should be updated to check the DT compatible property instead. The machine was converted to FDT booting in commit fbf04d814d0a ("ARM: orion5x: convert Maxtor Shared Storage II to the Device Tree"). The presence of this machine ID check prevents the removal of machine IDs no longer used by the kernel from arch/arm/tools/mach-types, because the machine_is_*() macros are generated from mach-types. To resolve this issue, use of_machine_is_compatible() instead. Signed-off-by: Ethan Nelson-Moore Signed-off-by: Gregory CLEMENT --- arch/arm/mach-orion5x/board-mss2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-orion5x/board-mss2.c b/arch/arm/mach-orion5x/board-mss2.c index 9e3d69891d2f..322ae29d05aa 100644 --- a/arch/arm/mach-orion5x/board-mss2.c +++ b/arch/arm/mach-orion5x/board-mss2.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include "orion5x.h" @@ -47,7 +47,7 @@ static struct hw_pci mss2_pci __initdata = { static int __init mss2_pci_init(void) { - if (machine_is_mss2()) + if (of_machine_is_compatible("maxtor,shared-storage-2")) pci_common_init(&mss2_pci); return 0;