Skip to contentSkip to conversation

x86: mm/pat.c pat_disable should be static

PATCH In review Jaswinder Singh Rajput 2 participants 2 messages Apr 11, 2009

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

PATCH 1/1 x86: mm/pat.c pat_disable should be static

Impact: reduce kernel size a bit, avoid sparse warning

Fixes sparse warning:
arch/x86/mm/pat.c:34:16: warning: symbol 'pat_disable' was not declared. Should it be static?

---
 arch/x86/mm/pat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/pat.c +1 -1
index cc5e0e2..bc53d8d 100644
@@ -31,7 +31,7 @@
 #ifdef CONFIG_X86_PAT
 int __read_mostly pat_enabled = 1;
 
-void __cpuinit pat_disable(const char *reason)
+static void __cpuinit pat_disable(const char *reason)
 {
 	pat_enabled = 0;
 	printk(KERN_INFO "%s\n", reason);
Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 15 lines · Jaswinder Singh Rajput

Impact: reduce kernel size a bit, avoid sparse warning

Fixes sparse warning:
arch/x86/mm/pat.c:34:16: warning: symbol 'pat_disable' was not declared. Should it be static?

---
 arch/x86/mm/pat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/pat.c +0 -0
index cc5e0e2..bc53d8d 100644

arch/x86/mm/pat.c line 37

Quoted 8 lines
arch/x86/mm/pat.c +1 -1
@@ -31,7 +31,7 @@
 #ifdef CONFIG_X86_PAT
 int __read_mostly pat_enabled = 1;
 
-void __cpuinit pat_disable(const char *reason)
+static void __cpuinit pat_disable(const char *reason)
 {
 	pat_enabled = 0;
 	printk(KERN_INFO "%s\n", reason);

This is fixed in a better way.
See Marcin's patch: http://lkml.org/lkml/2009/4/10/384

If you had looked carefully at the call-sites you would have noticed that not all of them were annotated __cpunint/__init.

Sam