diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-12-07 03:02:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-07 03:02:08 -0500 |
commit | 53ae341926b1238af3170f2f306f52a22430776c (patch) | |
tree | 6880ddd6b7e0e6bb317f05c1c2700c8f7ed0a445 /arch | |
parent | 7e7e93a22851f7bf0cbb7cd70878ebd811e4a044 (diff) |
sparc: fix sparse warnings in cpu_*.c
o declare variables from cpu_*.c
o declare function from cpu_32.c
To do this introduce a new header "kernel.h" which is local to kernel/
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/cpu_32.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/cpu_64.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/entry.h | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/kernel.h | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_32.c | 5 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_64.c | 1 |
6 files changed, 16 insertions, 8 deletions
diff --git a/arch/sparc/kernel/cpu_32.c b/arch/sparc/kernel/cpu_32.c index cdaf7630df81..4e14240f9ce3 100644 --- a/arch/sparc/kernel/cpu_32.c +++ b/arch/sparc/kernel/cpu_32.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <asm/mbus.h> | 15 | #include <asm/mbus.h> |
16 | #include <asm/cpudata.h> | 16 | #include <asm/cpudata.h> |
17 | 17 | ||
18 | #include "kernel.h" | ||
19 | |||
18 | DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; | 20 | DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; |
19 | 21 | ||
20 | struct cpu_iu_info { | 22 | struct cpu_iu_info { |
@@ -125,8 +127,8 @@ static struct cpu_iu_info linux_sparc_chips[] = { | |||
125 | 127 | ||
126 | #define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips) | 128 | #define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips) |
127 | 129 | ||
128 | char *sparc_cpu_type; | 130 | const char *sparc_cpu_type; |
129 | char *sparc_fpu_type; | 131 | const char *sparc_fpu_type; |
130 | 132 | ||
131 | unsigned int fsr_storage; | 133 | unsigned int fsr_storage; |
132 | 134 | ||
diff --git a/arch/sparc/kernel/cpu_64.c b/arch/sparc/kernel/cpu_64.c index 0c9ac83ed0a8..4a81ed744477 100644 --- a/arch/sparc/kernel/cpu_64.c +++ b/arch/sparc/kernel/cpu_64.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/oplib.h> | 16 | #include <asm/oplib.h> |
17 | 17 | ||
18 | #include "entry.h" | 18 | #include "entry.h" |
19 | #include "kernel.h" | ||
19 | 20 | ||
20 | DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; | 21 | DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; |
21 | 22 | ||
diff --git a/arch/sparc/kernel/entry.h b/arch/sparc/kernel/entry.h index 34d7ab5e10d2..a9ab19aa0411 100644 --- a/arch/sparc/kernel/entry.h +++ b/arch/sparc/kernel/entry.h | |||
@@ -5,9 +5,6 @@ | |||
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | 7 | ||
8 | extern const char *sparc_cpu_type; | ||
9 | extern const char *sparc_fpu_type; | ||
10 | |||
11 | extern void __init per_cpu_patch(void); | 8 | extern void __init per_cpu_patch(void); |
12 | extern void __init sun4v_patch(void); | 9 | extern void __init sun4v_patch(void); |
13 | extern void __init boot_cpu_id_too_large(int cpu); | 10 | extern void __init boot_cpu_id_too_large(int cpu); |
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h new file mode 100644 index 000000000000..7f02aad2e1ab --- /dev/null +++ b/arch/sparc/kernel/kernel.h | |||
@@ -0,0 +1,8 @@ | |||
1 | /* cpu.c */ | ||
2 | extern const char *sparc_cpu_type; | ||
3 | extern const char *sparc_fpu_type; | ||
4 | |||
5 | extern unsigned int fsr_storage; | ||
6 | |||
7 | extern void cpu_probe(void); | ||
8 | |||
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index d21abbe26360..c96c65d1b58b 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #include <asm/cpudata.h> | 46 | #include <asm/cpudata.h> |
47 | #include <asm/setup.h> | 47 | #include <asm/setup.h> |
48 | 48 | ||
49 | #include "kernel.h" | ||
50 | |||
49 | struct screen_info screen_info = { | 51 | struct screen_info screen_info = { |
50 | 0, 0, /* orig-x, orig-y */ | 52 | 0, 0, /* orig-x, orig-y */ |
51 | 0, /* unused */ | 53 | 0, /* unused */ |
@@ -308,9 +310,6 @@ void __init setup_arch(char **cmdline_p) | |||
308 | smp_setup_cpu_possible_map(); | 310 | smp_setup_cpu_possible_map(); |
309 | } | 311 | } |
310 | 312 | ||
311 | extern char *sparc_cpu_type; | ||
312 | extern char *sparc_fpu_type; | ||
313 | |||
314 | static int ncpus_probed; | 313 | static int ncpus_probed; |
315 | 314 | ||
316 | static int show_cpuinfo(struct seq_file *m, void *__unused) | 315 | static int show_cpuinfo(struct seq_file *m, void *__unused) |
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index c8b03a4f68bf..555db7452ebe 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #include "entry.h" | 54 | #include "entry.h" |
55 | #include "kernel.h" | ||
55 | 56 | ||
56 | /* Used to synchronize accesses to NatSemi SUPER I/O chip configure | 57 | /* Used to synchronize accesses to NatSemi SUPER I/O chip configure |
57 | * operations in asm/ns87303.h | 58 | * operations in asm/ns87303.h |