Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sam Ravnborg and committed by
David S. Miller
fd250a66 7c8ee361

+11 -5
+10
arch/sparc/include/asm/cpudata.h
··· 1 1 #ifndef ___ASM_SPARC_CPUDATA_H 2 2 #define ___ASM_SPARC_CPUDATA_H 3 + 4 + #ifndef __ASSEMBLY__ 5 + 6 + #include <linux/threads.h> 7 + #include <linux/percpu.h> 8 + 9 + extern const struct seq_operations cpuinfo_op; 10 + 11 + #endif /* !(__ASSEMBLY__) */ 12 + 3 13 #if defined(__sparc__) && defined(__arch64__) 4 14 #include <asm/cpudata_64.h> 5 15 #else
-5
arch/sparc/include/asm/cpudata_64.h
··· 8 8 9 9 #ifndef __ASSEMBLY__ 10 10 11 - #include <linux/percpu.h> 12 - #include <linux/threads.h> 13 - 14 11 typedef struct { 15 12 /* Dcache line 1 */ 16 13 unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ ··· 31 34 DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data); 32 35 #define cpu_data(__cpu) per_cpu(__cpu_data, (__cpu)) 33 36 #define local_cpu_data() __get_cpu_var(__cpu_data) 34 - 35 - extern const struct seq_operations cpuinfo_op; 36 37 37 38 #endif /* !(__ASSEMBLY__) */ 38 39
+1
arch/sparc/kernel/cpu.c
··· 22 22 #include <asm/cpudata.h> 23 23 24 24 #include "kernel.h" 25 + #include "entry.h" 25 26 26 27 DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; 27 28 EXPORT_PER_CPU_SYMBOL(__cpu_data);