[PATCH v3] LoongArch: acpi: Make parse_acpi_topology() return void

WangYuli posted 1 patch 10 months ago
arch/loongarch/include/asm/acpi.h |  2 +-
arch/loongarch/kernel/acpi.c      | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
[PATCH v3] LoongArch: acpi: Make parse_acpi_topology() return void
Posted by WangYuli 10 months ago
The return value of parse_acpi_topology() is both unnecessary and
unused.

Co-developed-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Yuli Wang <wangyuli@uniontech.com>
---
Changelog:
 *v1->v2: Fix missing "return".
  v2->v3: Fix missing "{}"
---
 arch/loongarch/include/asm/acpi.h |  2 +-
 arch/loongarch/kernel/acpi.c      | 12 ++++++------
 2 files changed, 7 insertions(+), 7 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..2bb3bc42e6ed 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,23 +181,23 @@ 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)
 			cpu_data[cpu].core = topology_id;
 		else {
 			topology_id = find_acpi_cpu_topology(cpu, 1);
-			if (topology_id < 0)
-				return -ENOENT;
+			if (topology_id < 0){
+				pr_warn("Invalid BIOS PPTT\n");
+				return;
+			}
 
 			cpu_data[cpu].core = topology_id;
 		}
 	}
 
 	pptt_enabled = 1;
-
-	return 0;
 }
 
 #ifndef CONFIG_SUSPEND
-- 
2.47.2