[<prev] [next>] [day] [month] [year] [list]
Message-ID: <90496FB80CAB5AAE+20250218100946.502797-1-wangyuli@uniontech.com>
Date: Tue, 18 Feb 2025 18:09:46 +0800
From: WangYuli <wangyuli@...ontech.com>
To: chenhuacai@...nel.org,
kernel@...0n.name
Cc: loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org,
wangyuli@...ontech.com,
guanwentao@...ontech.com,
yangtiezhu@...ngson.cn,
maobibo@...ngson.cn,
zhanjun@...ontech.com,
niecheng1@...ontech.com,
chenlinxuan@...ontech.com
Subject: [PATCH v3] LoongArch: acpi: Make parse_acpi_topology() return void
The return value of parse_acpi_topology() is both unnecessary and
unused.
Co-developed-by: Wentao Guan <guanwentao@...ontech.com>
Signed-off-by: Wentao Guan <guanwentao@...ontech.com>
Signed-off-by: Yuli Wang <wangyuli@...ontech.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
Powered by blists - more mailing lists