Skip to contentSkip to conversation

arch: x86: kernel: apic: Remove unnecessary ifdef

PATCH New Andreas Ruprecht 2 participants 2 messages Aug 20, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch: x86: kernel: apic: Remove unnecessary ifdef

In the file x2apic_uv_x.c, some code is compiled conditionally depending on CONFIG_SMP. However, the file is only built, if CONFIG_X86_UV is enabled.

CONFIG_X86_UV depends on CONFIG_NUMA, which itself depends on CONFIG_SMP, so the ifdef will always evaluate to true, if the file is compiled. Thus, it is unnecessary and can be removed.

---
 arch/x86/kernel/apic/x2apic_uv_x.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kernel/apic/x2apic_uv_x.c +0 -2
index 004f017..8e9dcfd 100644
@@ -204,7 +204,6 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second);
 
 static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)
 {
-#ifdef CONFIG_SMP
 	unsigned long val;
 	int pnode;
 
@@ -223,7 +222,6 @@ static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)
 	uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
 
 	atomic_set(&init_deasserted, 1);
-#endif
 	return 0;
 }
 
Signature · 1 line
1.9.1
#1 lore raw

[tip:x86/uv] x86/apic/uv: Remove unnecessary #ifdef

x86/apic/uv: Remove unnecessary #ifdef
Commit-ID:  8091c1f8ea2374695c105591179b1269fb5f2fbb
Gitweb:     http://git.kernel.org/tip/8091c1f8ea2374695c105591179b1269fb5f2fbb
Author:     Andreas Ruprecht <[email protected]>
AuthorDate: Wed, 20 Aug 2014 10:16:01 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 20 Aug 2014 15:05:30 +0200

x86/apic/uv: Remove unnecessary #ifdef

In the file x2apic_uv_x.c, some code is compiled conditionally depending on CONFIG_SMP. However, the file is only built, if CONFIG_X86_UV is enabled.

CONFIG_X86_UV depends on CONFIG_NUMA, which itself depends on CONFIG_SMP, so the #ifdef will always evaluate to true, if the file is compiled. Thus, it is unnecessary and can be removed.

---
 arch/x86/kernel/apic/x2apic_uv_x.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kernel/apic/x2apic_uv_x.c +0 -2
index 293b41d..2f1b5e0 100644
@@ -204,7 +204,6 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second);
 
 static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)
 {
-#ifdef CONFIG_SMP
 	unsigned long val;
 	int pnode;
 
@@ -223,7 +222,6 @@ static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)
 	uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
 
 	atomic_set(&init_deasserted, 1);
-#endif
 	return 0;
 }