From: Shivank Garg Date: Tue, 12 Nov 2024 07:23:47 +0000 (+0000) Subject: x86/cpu: Remove redundant CONFIG_NUMA guard around numa_add_cpu() X-Git-Tag: v6.13-rc1~182^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f74642d81c24d9e69745cd0b75e1bddc81827606;p=thirdparty%2Fkernel%2Flinux.git x86/cpu: Remove redundant CONFIG_NUMA guard around numa_add_cpu() Remove unnecessary CONFIG_NUMA #ifdef around numa_add_cpu() since the function is already properly handled in 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: Build CONFIG_NUMA=n Signed-off-by: Shivank Garg Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20241112072346.428623-1-shivankg@amd.com --- diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 07a34d7235057..59dc73558fe3a 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1902,9 +1902,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 } /*