From fd250a664d35d6eb3e09694419c2ee16f23d536a Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 21 Apr 2014 21:39:30 +0200 Subject: sparc: fix sparse warnings in cpu.c Fix following sparc32 warning: cpu.c:430:29: warning: symbol 'cpuinfo_op' was not declared. Should it be static? Fix following sparc64 warnings: cpu.c:364:14: warning: symbol 'dcache_parity_tl1_occurred' was not declared. Should it be static? cpu.c:365:14: warning: symbol 'icache_parity_tl1_occurred' was not declared. Should it be static? Rearrange asm/cpu.h to share more stuff between sparc32 and sparc64. Added missing include to cpu.c of kernel.h Signed-off-by: Sam Ravnborg Signed-off-by: David S. Miller --- arch/sparc/include/asm/cpudata.h | 10 ++++++++++ arch/sparc/include/asm/cpudata_64.h | 5 ----- arch/sparc/kernel/cpu.c | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/sparc/include/asm/cpudata.h b/arch/sparc/include/asm/cpudata.h index b5976de7cacd..128b56b08676 100644 --- a/arch/sparc/include/asm/cpudata.h +++ b/arch/sparc/include/asm/cpudata.h @@ -1,5 +1,15 @@ #ifndef ___ASM_SPARC_CPUDATA_H #define ___ASM_SPARC_CPUDATA_H + +#ifndef __ASSEMBLY__ + +#include +#include + +extern const struct seq_operations cpuinfo_op; + +#endif /* !(__ASSEMBLY__) */ + #if defined(__sparc__) && defined(__arch64__) #include #else diff --git a/arch/sparc/include/asm/cpudata_64.h b/arch/sparc/include/asm/cpudata_64.h index 050ef35b9dcf..0e594076912c 100644 --- a/arch/sparc/include/asm/cpudata_64.h +++ b/arch/sparc/include/asm/cpudata_64.h @@ -8,9 +8,6 @@ #ifndef __ASSEMBLY__ -#include -#include - typedef struct { /* Dcache line 1 */ unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ @@ -35,8 +32,6 @@ DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data); #define cpu_data(__cpu) per_cpu(__cpu_data, (__cpu)) #define local_cpu_data() __get_cpu_var(__cpu_data) -extern const struct seq_operations cpuinfo_op; - #endif /* !(__ASSEMBLY__) */ #include diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c index 5c5125895db8..82a3a71c451e 100644 --- a/arch/sparc/kernel/cpu.c +++ b/arch/sparc/kernel/cpu.c @@ -22,6 +22,7 @@ #include #include "kernel.h" +#include "entry.h" DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; EXPORT_PER_CPU_SYMBOL(__cpu_data); -- cgit v1.2.3