[PATCH] x86/cpu: Remove redundant CONFIG_NUMA guard around numa_add_cpu()
From: Shivank Garg
Date: Tue Nov 12 2024 - 02:25:03 EST
Remove unnecessary CONFIG_NUMA ifdef around numa_add_cpu() since the
function is already properly handled in numa.h for both NUMA and
non-NUMA configurations. For !CONFIG_NUMA builds, numa_add_cpu() is
defined as an empty function.
Simplify the code without any functionality change.
Testing: Make CONFIG_NUMA=n build
Signed-off-by: Shivank Garg <shivankg@xxxxxxx>
---
arch/x86/kernel/cpu/common.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index a5f221ea5688..e5b128fc8184 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1906,9 +1906,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
/* Init Machine Check Exception if available. */
mcheck_cpu_init(c);
-#ifdef CONFIG_NUMA
numa_add_cpu(smp_processor_id());
-#endif
}
/*
--
2.34.1