Skip to content

Commit f74642d

Browse files
shivankgarg98ingomolnar
authored andcommitted
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 <asm/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: Build CONFIG_NUMA=n Signed-off-by: Shivank Garg <shivankg@amd.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241112072346.428623-1-shivankg@amd.com
1 parent 110213b commit f74642d

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

arch/x86/kernel/cpu/common.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,9 +1902,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
19021902
/* Init Machine Check Exception if available. */
19031903
mcheck_cpu_init(c);
19041904

1905-
#ifdef CONFIG_NUMA
19061905
numa_add_cpu(smp_processor_id());
1907-
#endif
19081906
}
19091907

19101908
/*

0 commit comments

Comments
 (0)