Skip to contentSkip to conversation

sparc64: fix sparse warnings in init_64.c

PATCH Superseded Sam Ravnborg 1 participant 2 messages May 3, 2014 – May 16, 2014 SPARC + UltraSPARC (sparc/sparc64)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 29/34 sparc64: fix sparse warnings in init_64.c

Fix following warnings:
init_64.c:191:10: warning: symbol 'dcpage_flushes' was not declared. Should it be static? init_64.c:193:10: warning: symbol 'dcpage_flushes_xcall' was not declared. Should it be static?

Add extern declaration to asm/setup.h and drop local declaration in smp_64.h

---
 arch/sparc/include/asm/setup.h | 4 ++++
 arch/sparc/kernel/smp_64.c     | 6 +-----
 arch/sparc/mm/init_64.c        | 1 +
 3 files changed, 6 insertions(+), 5 deletions(-)
arch/sparc/include/asm/setup.h +4 -0
index 0c4f695..f5fffd8 100644
@@ -52,6 +52,10 @@ unsigned long safe_compute_effective_address(struct pt_regs *, unsigned int);
 int handle_ldf_stq(u32 insn, struct pt_regs *regs);
 void handle_ld_nf(u32 insn, struct pt_regs *regs);
 
+/* init_64.c */
+extern atomic_t dcpage_flushes;
+extern atomic_t dcpage_flushes_xcall;
+
 extern int sysctl_tsb_ratio;
 #endif
 
arch/sparc/kernel/smp_64.c +1 -5
index afc71bf..61605b3 100644
@@ -36,6 +36,7 @@
 #include <asm/hvtramp.h>
 #include <asm/io.h>
 #include <asm/timer.h>
+#include <asm/setup.h>
 
 #include <asm/irq.h>
 #include <asm/irq_regs.h>
@@ -861,11 +862,6 @@ extern unsigned long xcall_flush_dcache_page_cheetah;
 #endif
 extern unsigned long xcall_flush_dcache_page_spitfire;
 
-#ifdef CONFIG_DEBUG_DCFLUSH
-extern atomic_t dcpage_flushes;
-extern atomic_t dcpage_flushes_xcall;
-#endif
-
 static inline void __local_flush_dcache_page(struct page *page)
 {
 #ifdef DCACHE_ALIASING_POSSIBLE
arch/sparc/mm/init_64.c +1 -0
index eafbc65..0ebe2fd 100644
@@ -47,6 +47,7 @@
 #include <asm/prom.h>
 #include <asm/mdesc.h>
 #include <asm/cpudata.h>
+#include <asm/setup.h>
 #include <asm/irq.h>
 
 #include "init_64.h"
Signature · 1 line
1.9.0
#1 lore raw

PATCH 29/34 sparc64: fix sparse warnings in init_64.c

Fix following warnings:
init_64.c:191:10: warning: symbol 'dcpage_flushes' was not declared. Should it be static? init_64.c:193:10: warning: symbol 'dcpage_flushes_xcall' was not declared. Should it be static?

Add extern declaration to asm/setup.h and drop local declaration in smp_64.h

---
 arch/sparc/include/asm/setup.h | 4 ++++
 arch/sparc/kernel/smp_64.c     | 6 +-----
 arch/sparc/mm/init_64.c        | 1 +
 3 files changed, 6 insertions(+), 5 deletions(-)
arch/sparc/include/asm/setup.h +4 -0
index 0c4f695..f5fffd8 100644
@@ -52,6 +52,10 @@ unsigned long safe_compute_effective_address(struct pt_regs *, unsigned int);
 int handle_ldf_stq(u32 insn, struct pt_regs *regs);
 void handle_ld_nf(u32 insn, struct pt_regs *regs);
 
+/* init_64.c */
+extern atomic_t dcpage_flushes;
+extern atomic_t dcpage_flushes_xcall;
+
 extern int sysctl_tsb_ratio;
 #endif
 
arch/sparc/kernel/smp_64.c +1 -5
index afc71bf..61605b3 100644
@@ -36,6 +36,7 @@
 #include <asm/hvtramp.h>
 #include <asm/io.h>
 #include <asm/timer.h>
+#include <asm/setup.h>
 
 #include <asm/irq.h>
 #include <asm/irq_regs.h>
@@ -861,11 +862,6 @@ extern unsigned long xcall_flush_dcache_page_cheetah;
 #endif
 extern unsigned long xcall_flush_dcache_page_spitfire;
 
-#ifdef CONFIG_DEBUG_DCFLUSH
-extern atomic_t dcpage_flushes;
-extern atomic_t dcpage_flushes_xcall;
-#endif
-
 static inline void __local_flush_dcache_page(struct page *page)
 {
 #ifdef DCACHE_ALIASING_POSSIBLE
arch/sparc/mm/init_64.c +1 -0
index eafbc65..0ebe2fd 100644
@@ -47,6 +47,7 @@
 #include <asm/prom.h>
 #include <asm/mdesc.h>
 #include <asm/cpudata.h>
+#include <asm/setup.h>
 #include <asm/irq.h>
 
 #include "init_64.h"
Signature · 1 line
1.9.0