Skip to contentSkip to conversation

x86: Change the return type of acpi_map_cpu2node to void

PATCH New Li kunyu 1 participant 1 message Jun 10, 2022

Subsystems (3)
lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 x86: Change the return type of acpi_map_cpu2node to void

Reduce eax register calls by removing unused return values.

---
 arch/ia64/kernel/acpi.c      | 3 +--
 arch/loongarch/kernel/acpi.c | 3 +--
 arch/x86/kernel/acpi/boot.c  | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)
arch/ia64/kernel/acpi.c +1 -2
index 96d13cb7c19f..2665cc873f0a 100644
@@ -712,7 +712,7 @@ int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi)
  *  ACPI based hotplug CPU support
  */
 #ifdef CONFIG_ACPI_HOTPLUG_CPU
-int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
+void acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
 {
 #ifdef CONFIG_ACPI_NUMA
 	/*
@@ -725,7 +725,6 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
 	node_cpuid[cpu].phys_id = physid;
 	node_cpuid[cpu].nid = acpi_get_node(handle);
 #endif
-	return 0;
 }
 
 int additional_cpus __initdata = -1;
arch/loongarch/kernel/acpi.c +1 -2
index b16c3dea5eeb..369b49343563 100644
@@ -282,7 +282,7 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)
 
 #include <acpi/processor.h>
 
-static int __ref acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
+static void __ref acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
 {
 #ifdef CONFIG_ACPI_NUMA
 	int nid;
@@ -295,7 +295,6 @@ static int __ref acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
 		cpumask_set_cpu(cpu, cpumask_of_node(nid));
 	}
 #endif
-	return 0;
 }
 
 int acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, u32 acpi_id, int *pcpu)
arch/x86/kernel/acpi/boot.c +1 -2
index 907cc98b1938..d63ec3ea3be3 100644
@@ -799,7 +799,7 @@ static void __init acpi_set_irq_model_ioapic(void)
 #ifdef CONFIG_ACPI_HOTPLUG_CPU
 #include <acpi/processor.h>
 
-static int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
+static void acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
 {
 #ifdef CONFIG_ACPI_NUMA
 	int nid;
@@ -810,7 +810,6 @@ static int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
 		numa_set_node(cpu, nid);
 	}
 #endif
-	return 0;
 }
 
 int acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, u32 acpi_id,
Signature · 1 line
2.18.2