aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2008-05-08 00:27:19 -0400
committerPaul Mackerras <paulus@samba.org>2008-05-14 08:31:59 -0400
commit1c21a2937b1f342a8f5d580203c3396557d53b6e (patch)
tree78ee69e632c12afb00647f7aade4bca9b4344905 /arch
parent1c8950ff87de950a3b6ccfb26650fc0a56278836 (diff)
[POWERPC] Fix sparse warnings in arch/powerpc/kernel
Make a few things static in lparcfg.c Make init and exit routines static in rtas_flash.c Make things static in rtas_pci.c Make some functions static in rtas.c Make fops static in rtas-proc.c Remove unneeded extern for do_gtod in smp.c Make clocksource_init() static in time.c Make last_tick_len and ticklen_to_xs static in time.c Move the declaration of the pvr per-cpu into smp.h Make kexec_smp_down() and kexec_stack static in machine_kexec_64.c Don't return void in arch_teardown_msi_irqs() in msi.c Move declaration of GregorianDay()into asm/time.h Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/lparcfg.c6
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c4
-rw-r--r--arch/powerpc/kernel/msi.c2
-rw-r--r--arch/powerpc/kernel/rtas-proc.c14
-rw-r--r--arch/powerpc/kernel/rtas.c6
-rw-r--r--arch/powerpc/kernel/rtas_flash.c4
-rw-r--r--arch/powerpc/kernel/rtas_pci.c4
-rw-r--r--arch/powerpc/kernel/smp.c4
-rw-r--r--arch/powerpc/kernel/time.c10
-rw-r--r--arch/powerpc/platforms/maple/time.c2
10 files changed, 25 insertions, 31 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 1e656b43ad7f..827a5726a035 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -573,7 +573,7 @@ static int lparcfg_open(struct inode *inode, struct file *file)
573 return single_open(file, lparcfg_data, NULL); 573 return single_open(file, lparcfg_data, NULL);
574} 574}
575 575
576const struct file_operations lparcfg_fops = { 576static const struct file_operations lparcfg_fops = {
577 .owner = THIS_MODULE, 577 .owner = THIS_MODULE,
578 .read = seq_read, 578 .read = seq_read,
579 .write = lparcfg_write, 579 .write = lparcfg_write,
@@ -581,7 +581,7 @@ const struct file_operations lparcfg_fops = {
581 .release = single_release, 581 .release = single_release,
582}; 582};
583 583
584int __init lparcfg_init(void) 584static int __init lparcfg_init(void)
585{ 585{
586 struct proc_dir_entry *ent; 586 struct proc_dir_entry *ent;
587 mode_t mode = S_IRUSR | S_IRGRP | S_IROTH; 587 mode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
@@ -601,7 +601,7 @@ int __init lparcfg_init(void)
601 return 0; 601 return 0;
602} 602}
603 603
604void __exit lparcfg_cleanup(void) 604static void __exit lparcfg_cleanup(void)
605{ 605{
606 if (proc_ppc64_lparcfg) 606 if (proc_ppc64_lparcfg)
607 remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent); 607 remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent);
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 704375bda73a..631dfd614b21 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -158,7 +158,7 @@ void kexec_copy_flush(struct kimage *image)
158 * on calling the interrupts, but we would like to call it off irq level 158 * on calling the interrupts, but we would like to call it off irq level
159 * so that the interrupt controller is clean. 159 * so that the interrupt controller is clean.
160 */ 160 */
161void kexec_smp_down(void *arg) 161static void kexec_smp_down(void *arg)
162{ 162{
163 if (ppc_md.kexec_cpu_down) 163 if (ppc_md.kexec_cpu_down)
164 ppc_md.kexec_cpu_down(0, 1); 164 ppc_md.kexec_cpu_down(0, 1);
@@ -249,7 +249,7 @@ static void kexec_prepare_cpus(void)
249 * We could use a smaller stack if we don't care about anything using 249 * We could use a smaller stack if we don't care about anything using
250 * current, but that audit has not been performed. 250 * current, but that audit has not been performed.
251 */ 251 */
252union thread_union kexec_stack 252static union thread_union kexec_stack
253 __attribute__((__section__(".data.init_task"))) = { }; 253 __attribute__((__section__(".data.init_task"))) = { };
254 254
255/* Our assembly helper, in kexec_stub.S */ 255/* Our assembly helper, in kexec_stub.S */
diff --git a/arch/powerpc/kernel/msi.c b/arch/powerpc/kernel/msi.c
index c62d1012c013..3bb7d3dd28be 100644
--- a/arch/powerpc/kernel/msi.c
+++ b/arch/powerpc/kernel/msi.c
@@ -34,5 +34,5 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
34 34
35void arch_teardown_msi_irqs(struct pci_dev *dev) 35void arch_teardown_msi_irqs(struct pci_dev *dev)
36{ 36{
37 return ppc_md.teardown_msi_irqs(dev); 37 ppc_md.teardown_msi_irqs(dev);
38} 38}
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index f9c6abc84a94..1be9fe38bcb5 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -160,7 +160,7 @@ static int sensors_open(struct inode *inode, struct file *file)
160 return single_open(file, ppc_rtas_sensors_show, NULL); 160 return single_open(file, ppc_rtas_sensors_show, NULL);
161} 161}
162 162
163const struct file_operations ppc_rtas_sensors_operations = { 163static const struct file_operations ppc_rtas_sensors_operations = {
164 .open = sensors_open, 164 .open = sensors_open,
165 .read = seq_read, 165 .read = seq_read,
166 .llseek = seq_lseek, 166 .llseek = seq_lseek,
@@ -172,7 +172,7 @@ static int poweron_open(struct inode *inode, struct file *file)
172 return single_open(file, ppc_rtas_poweron_show, NULL); 172 return single_open(file, ppc_rtas_poweron_show, NULL);
173} 173}
174 174
175const struct file_operations ppc_rtas_poweron_operations = { 175static const struct file_operations ppc_rtas_poweron_operations = {
176 .open = poweron_open, 176 .open = poweron_open,
177 .read = seq_read, 177 .read = seq_read,
178 .llseek = seq_lseek, 178 .llseek = seq_lseek,
@@ -185,7 +185,7 @@ static int progress_open(struct inode *inode, struct file *file)
185 return single_open(file, ppc_rtas_progress_show, NULL); 185 return single_open(file, ppc_rtas_progress_show, NULL);
186} 186}
187 187
188const struct file_operations ppc_rtas_progress_operations = { 188static const struct file_operations ppc_rtas_progress_operations = {
189 .open = progress_open, 189 .open = progress_open,
190 .read = seq_read, 190 .read = seq_read,
191 .llseek = seq_lseek, 191 .llseek = seq_lseek,
@@ -198,7 +198,7 @@ static int clock_open(struct inode *inode, struct file *file)
198 return single_open(file, ppc_rtas_clock_show, NULL); 198 return single_open(file, ppc_rtas_clock_show, NULL);
199} 199}
200 200
201const struct file_operations ppc_rtas_clock_operations = { 201static const struct file_operations ppc_rtas_clock_operations = {
202 .open = clock_open, 202 .open = clock_open,
203 .read = seq_read, 203 .read = seq_read,
204 .llseek = seq_lseek, 204 .llseek = seq_lseek,
@@ -211,7 +211,7 @@ static int tone_freq_open(struct inode *inode, struct file *file)
211 return single_open(file, ppc_rtas_tone_freq_show, NULL); 211 return single_open(file, ppc_rtas_tone_freq_show, NULL);
212} 212}
213 213
214const struct file_operations ppc_rtas_tone_freq_operations = { 214static const struct file_operations ppc_rtas_tone_freq_operations = {
215 .open = tone_freq_open, 215 .open = tone_freq_open,
216 .read = seq_read, 216 .read = seq_read,
217 .llseek = seq_lseek, 217 .llseek = seq_lseek,
@@ -224,7 +224,7 @@ static int tone_volume_open(struct inode *inode, struct file *file)
224 return single_open(file, ppc_rtas_tone_volume_show, NULL); 224 return single_open(file, ppc_rtas_tone_volume_show, NULL);
225} 225}
226 226
227const struct file_operations ppc_rtas_tone_volume_operations = { 227static const struct file_operations ppc_rtas_tone_volume_operations = {
228 .open = tone_volume_open, 228 .open = tone_volume_open,
229 .read = seq_read, 229 .read = seq_read,
230 .llseek = seq_lseek, 230 .llseek = seq_lseek,
@@ -237,7 +237,7 @@ static int rmo_buf_open(struct inode *inode, struct file *file)
237 return single_open(file, ppc_rtas_rmo_buf_show, NULL); 237 return single_open(file, ppc_rtas_rmo_buf_show, NULL);
238} 238}
239 239
240const struct file_operations ppc_rtas_rmo_buf_ops = { 240static const struct file_operations ppc_rtas_rmo_buf_ops = {
241 .open = rmo_buf_open, 241 .open = rmo_buf_open,
242 .read = seq_read, 242 .read = seq_read,
243 .llseek = seq_lseek, 243 .llseek = seq_lseek,
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 34843c318419..2a60bd3e3afa 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -340,8 +340,8 @@ int rtas_get_error_log_max(void)
340EXPORT_SYMBOL(rtas_get_error_log_max); 340EXPORT_SYMBOL(rtas_get_error_log_max);
341 341
342 342
343char rtas_err_buf[RTAS_ERROR_LOG_MAX]; 343static char rtas_err_buf[RTAS_ERROR_LOG_MAX];
344int rtas_last_error_token; 344static int rtas_last_error_token;
345 345
346/** Return a copy of the detailed error text associated with the 346/** Return a copy of the detailed error text associated with the
347 * most recent failed call to rtas. Because the error text 347 * most recent failed call to rtas. Because the error text
@@ -484,7 +484,7 @@ unsigned int rtas_busy_delay(int status)
484} 484}
485EXPORT_SYMBOL(rtas_busy_delay); 485EXPORT_SYMBOL(rtas_busy_delay);
486 486
487int rtas_error_rc(int rtas_rc) 487static int rtas_error_rc(int rtas_rc)
488{ 488{
489 int rc; 489 int rc;
490 490
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 0a5e22b22729..09ded5c424a9 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -731,7 +731,7 @@ static const struct file_operations validate_flash_operations = {
731 .release = validate_flash_release, 731 .release = validate_flash_release,
732}; 732};
733 733
734int __init rtas_flash_init(void) 734static int __init rtas_flash_init(void)
735{ 735{
736 int rc; 736 int rc;
737 737
@@ -817,7 +817,7 @@ cleanup:
817 return rc; 817 return rc;
818} 818}
819 819
820void __exit rtas_flash_cleanup(void) 820static void __exit rtas_flash_cleanup(void)
821{ 821{
822 rtas_flash_term_hook = NULL; 822 rtas_flash_term_hook = NULL;
823 823
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 3ab88a9dc70d..589a2797eac2 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -155,12 +155,12 @@ static int rtas_pci_write_config(struct pci_bus *bus,
155 return PCIBIOS_DEVICE_NOT_FOUND; 155 return PCIBIOS_DEVICE_NOT_FOUND;
156} 156}
157 157
158struct pci_ops rtas_pci_ops = { 158static struct pci_ops rtas_pci_ops = {
159 .read = rtas_pci_read_config, 159 .read = rtas_pci_read_config,
160 .write = rtas_pci_write_config, 160 .write = rtas_pci_write_config,
161}; 161};
162 162
163int is_python(struct device_node *dev) 163static int is_python(struct device_node *dev)
164{ 164{
165 const char *model = of_get_property(dev, "model", NULL); 165 const char *model = of_get_property(dev, "model", NULL);
166 166
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 1457aa0a08f1..ba7989ffaeee 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -365,12 +365,8 @@ void smp_call_function_interrupt(void)
365 } 365 }
366} 366}
367 367
368extern struct gettimeofday_struct do_gtod;
369
370struct thread_info *current_set[NR_CPUS]; 368struct thread_info *current_set[NR_CPUS];
371 369
372DECLARE_PER_CPU(unsigned int, pvr);
373
374static void __devinit smp_store_cpu_info(int id) 370static void __devinit smp_store_cpu_info(int id)
375{ 371{
376 per_cpu(pvr, id) = mfspr(SPRN_PVR); 372 per_cpu(pvr, id) = mfspr(SPRN_PVR);
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 73401e83739a..c73fc33aa817 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -129,7 +129,7 @@ static unsigned long __initdata iSeries_recal_titan;
129static signed long __initdata iSeries_recal_tb; 129static signed long __initdata iSeries_recal_tb;
130 130
131/* Forward declaration is only needed for iSereis compiles */ 131/* Forward declaration is only needed for iSereis compiles */
132void __init clocksource_init(void); 132static void __init clocksource_init(void);
133#endif 133#endif
134 134
135#define XSEC_PER_SEC (1024*1024) 135#define XSEC_PER_SEC (1024*1024)
@@ -150,8 +150,8 @@ u64 tb_to_xs;
150unsigned tb_to_us; 150unsigned tb_to_us;
151 151
152#define TICKLEN_SCALE NTP_SCALE_SHIFT 152#define TICKLEN_SCALE NTP_SCALE_SHIFT
153u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */ 153static u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */
154u64 ticklen_to_xs; /* 0.64 fraction */ 154static u64 ticklen_to_xs; /* 0.64 fraction */
155 155
156/* If last_tick_len corresponds to about 1/HZ seconds, then 156/* If last_tick_len corresponds to about 1/HZ seconds, then
157 last_tick_len << TICKLEN_SHIFT will be about 2^63. */ 157 last_tick_len << TICKLEN_SHIFT will be about 2^63. */
@@ -164,7 +164,7 @@ static u64 tb_to_ns_scale __read_mostly;
164static unsigned tb_to_ns_shift __read_mostly; 164static unsigned tb_to_ns_shift __read_mostly;
165static unsigned long boot_tb __read_mostly; 165static unsigned long boot_tb __read_mostly;
166 166
167struct gettimeofday_struct do_gtod; 167static struct gettimeofday_struct do_gtod;
168 168
169extern struct timezone sys_tz; 169extern struct timezone sys_tz;
170static long timezone_offset; 170static long timezone_offset;
@@ -832,7 +832,7 @@ void update_vsyscall_tz(void)
832 ++vdso_data->tb_update_count; 832 ++vdso_data->tb_update_count;
833} 833}
834 834
835void __init clocksource_init(void) 835static void __init clocksource_init(void)
836{ 836{
837 struct clocksource *clock; 837 struct clocksource *clock;
838 838
diff --git a/arch/powerpc/platforms/maple/time.c b/arch/powerpc/platforms/maple/time.c
index 9f7579b38c72..53bca132fb48 100644
--- a/arch/powerpc/platforms/maple/time.c
+++ b/arch/powerpc/platforms/maple/time.c
@@ -41,8 +41,6 @@
41#define DBG(x...) 41#define DBG(x...)
42#endif 42#endif
43 43
44extern void GregorianDay(struct rtc_time * tm);
45
46static int maple_rtc_addr; 44static int maple_rtc_addr;
47 45
48static int maple_clock_read(int addr) 46static int maple_clock_read(int addr)