Skip to contentSkip to conversation

x86/cpu/amd: hide unused legacy_fixup_core_id() function

PATCH New Arnd Bergmann 2 participants 2 messages Aug 11, 2017 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/cpu/amd: hide unused legacy_fixup_core_id() function

The newly introduced function is only used when CONFIG_SMP is set:

arch/x86/kernel/cpu/amd.c:305:13: warning: 'legacy_fixup_core_id' defined but not used

This moves the existing #ifdef around the caller so it covers legacy_fixup_core_id as well.

Fixes b89b41d0b841 ("x86/cpu/amd: Limit cpu_core_id fixup to families older than F17h")
---
 arch/x86/kernel/cpu/amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/amd.c +1 -1
index aa3cf163fd19..9862e2cd6d93 100644
@@ -297,6 +297,7 @@ static int nearby_node(int apicid)
 }
 #endif
 
+#ifdef CONFIG_SMP
 /*
  * Fix up cpu_core_id for pre-F17h systems to be in the
  * [0 .. cores_per_node - 1] range. Not really needed but
@@ -319,7 +320,6 @@ static void legacy_fixup_core_id(struct cpuinfo_x86 *c)
  *     Assumption: Number of cores in each internal node is the same.
  * (2) AMD processors supporting compute units
  */
-#ifdef CONFIG_SMP
 static void amd_get_topology(struct cpuinfo_x86 *c)
 {
 	u8 node_id;
Signature · 1 line
2.9.0
#1 lore raw

[tip:x86/cpu] x86/cpu/amd: Hide unused legacy_fixup_core_id() function

x86/cpu/amd: Hide unused legacy_fixup_core_id() function
Commit-ID:  aac64f7de999d5a7fff55f49434fdd87df919829
Gitweb:     http://git.kernel.org/tip/aac64f7de999d5a7fff55f49434fdd87df919829
Author:     Arnd Bergmann <[email protected]>
AuthorDate: Fri, 11 Aug 2017 13:19:11 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 11 Aug 2017 14:58:34 +0200

x86/cpu/amd: Hide unused legacy_fixup_core_id() function

The newly introduced function is only used when CONFIG_SMP is set:

arch/x86/kernel/cpu/amd.c:305:13: warning: 'legacy_fixup_core_id' defined but not used

This moves the existing #ifdef around the caller so it covers legacy_fixup_core_id() as well.

Cc Borislav Petkov <[email protected]>
Cc Emanuel Czirai <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Suravee Suthikulpanit <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Tom Lendacky <[email protected]>
Cc Yazen Ghannam <[email protected]>
Fixes b89b41d0b841 ("x86/cpu/amd: Limit cpu_core_id fixup to families older than F17h")
---
 arch/x86/kernel/cpu/amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/amd.c +1 -1
index 82d571c..e44338d 100644
@@ -297,6 +297,7 @@ static int nearby_node(int apicid)
 }
 #endif
 
+#ifdef CONFIG_SMP
 /*
  * Fix up cpu_core_id for pre-F17h systems to be in the
  * [0 .. cores_per_node - 1] range. Not really needed but
@@ -319,7 +320,6 @@ static void legacy_fixup_core_id(struct cpuinfo_x86 *c)
  *     Assumption: Number of cores in each internal node is the same.
  * (2) AMD processors supporting compute units
  */
-#ifdef CONFIG_SMP
 static void amd_get_topology(struct cpuinfo_x86 *c)
 {
 	u8 node_id;