[PATCH v2] LoongArch: acpi: Make parse_acpi_topology() return void
From: WangYuli
Date: Tue Feb 18 2025 - 05:09:47 EST
The return value of parse_acpi_topology() is both unnecessary and
unused.
Co-developed-by: Wentao Guan <guanwentao@xxxxxxxxxxxxx>
Signed-off-by: Wentao Guan <guanwentao@xxxxxxxxxxxxx>
Signed-off-by: Yuli Wang <wangyuli@xxxxxxxxxxxxx>
---
Changelog:
*v1->v2: Fix missing "return".
---
arch/loongarch/include/asm/acpi.h | 2 +-
arch/loongarch/kernel/acpi.c | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/loongarch/include/asm/acpi.h b/arch/loongarch/include/asm/acpi.h
index 313f66f7913a..c1b90a90e28b 100644
--- a/arch/loongarch/include/asm/acpi.h
+++ b/arch/loongarch/include/asm/acpi.h
@@ -38,7 +38,7 @@ static inline bool acpi_has_cpu_in_madt(void)
extern struct list_head acpi_wakeup_device_list;
extern struct acpi_madt_core_pic acpi_core_pic[MAX_CORE_PIC];
-extern int __init parse_acpi_topology(void);
+extern void __init parse_acpi_topology(void);
static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
{
diff --git a/arch/loongarch/kernel/acpi.c b/arch/loongarch/kernel/acpi.c
index 382a09a7152c..5581e8009421 100644
--- a/arch/loongarch/kernel/acpi.c
+++ b/arch/loongarch/kernel/acpi.c
@@ -173,7 +173,7 @@ static void __init acpi_process_madt(void)
int pptt_enabled;
-int __init parse_acpi_topology(void)
+void __init parse_acpi_topology(void)
{
int cpu, topology_id;
@@ -181,7 +181,7 @@ int __init parse_acpi_topology(void)
topology_id = find_acpi_cpu_topology(cpu, 0);
if (topology_id < 0) {
pr_warn("Invalid BIOS PPTT\n");
- return -ENOENT;
+ return;
}
if (acpi_pptt_cpu_is_thread(cpu) <= 0)
@@ -189,15 +189,14 @@ int __init parse_acpi_topology(void)
else {
topology_id = find_acpi_cpu_topology(cpu, 1);
if (topology_id < 0)
- return -ENOENT;
+ pr_warn("Invalid BIOS PPTT\n");
+ return;
cpu_data[cpu].core = topology_id;
}
}
pptt_enabled = 1;
-
- return 0;
}
#ifndef CONFIG_SUSPEND
--
2.47.2