* [PATCH] LoongArch: acpi: Make parse_acpi_topology() return void
@ 2025-02-18 9:40 WangYuli
2025-02-18 9:57 ` Wentao Guan
0 siblings, 1 reply; 3+ messages in thread
From: WangYuli @ 2025-02-18 9:40 UTC (permalink / raw)
To: chenhuacai, kernel
Cc: loongarch, linux-kernel, wangyuli, guanwentao, yangtiezhu,
maobibo, zhanjun, niecheng1, chenlinxuan
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>
---
arch/loongarch/include/asm/acpi.h | 2 +-
arch/loongarch/kernel/acpi.c | 7 ++-----
2 files changed, 3 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..a95e8a7dd5a6 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,6 @@ 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;
}
if (acpi_pptt_cpu_is_thread(cpu) <= 0)
@@ -189,15 +188,13 @@ 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");
cpu_data[cpu].core = topology_id;
}
}
pptt_enabled = 1;
-
- return 0;
}
#ifndef CONFIG_SUSPEND
--
2.47.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re:[PATCH] LoongArch: acpi: Make parse_acpi_topology() return void
2025-02-18 9:40 [PATCH] LoongArch: acpi: Make parse_acpi_topology() return void WangYuli
@ 2025-02-18 9:57 ` Wentao Guan
2025-02-18 9:59 ` [PATCH] " WangYuli
0 siblings, 1 reply; 3+ messages in thread
From: Wentao Guan @ 2025-02-18 9:57 UTC (permalink / raw)
To: 王昱力, chenhuacai, WANG Xuerui
Cc: loongarch, linux-kernel, 王昱力,
yangtiezhu, maobibo, 占俊, 聂诚,
陈麟轩
NAK, MUST add "return;" after "pr_warn("Invalid BIOS PPTT\n");" twice.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] LoongArch: acpi: Make parse_acpi_topology() return void
2025-02-18 9:57 ` Wentao Guan
@ 2025-02-18 9:59 ` WangYuli
0 siblings, 0 replies; 3+ messages in thread
From: WangYuli @ 2025-02-18 9:59 UTC (permalink / raw)
To: Wentao Guan, chenhuacai, WANG Xuerui
Cc: loongarch, linux-kernel, yangtiezhu, maobibo, 占俊,
聂诚, 陈麟轩
[-- Attachment #1.1.1: Type: text/plain, Size: 4 bytes --]
v2
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 645 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-18 10:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-18 9:40 [PATCH] LoongArch: acpi: Make parse_acpi_topology() return void WangYuli
2025-02-18 9:57 ` Wentao Guan
2025-02-18 9:59 ` [PATCH] " WangYuli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®