Skip to content

Commit f310f8d

Browse files
committed
parisc: Move init function declarations into header file
Clean up the code to not have external function declarations inside the C source files. Reduces warnings when compiled with W=1. Signed-off-by: Helge Deller <[email protected]>
1 parent c808002 commit f310f8d

File tree

6 files changed

+36
-29
lines changed

6 files changed

+36
-29
lines changed

arch/parisc/include/asm/processor.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#ifndef __ASSEMBLY__
1313
#include <linux/threads.h>
14+
#include <linux/irqreturn.h>
1415

1516
#include <asm/assembly.h>
1617
#include <asm/prefetch.h>
@@ -292,6 +293,37 @@ extern void toc_handler(void);
292293
extern unsigned int toc_handler_size;
293294
extern unsigned int toc_handler_csum;
294295

296+
/* called from assembly code: */
297+
extern void start_parisc(void);
298+
extern void smp_callin(unsigned long);
299+
extern void sys_rt_sigreturn(struct pt_regs *, int);
300+
extern void do_notify_resume(struct pt_regs *, long);
301+
extern long do_syscall_trace_enter(struct pt_regs *);
302+
extern void do_syscall_trace_exit(struct pt_regs *);
303+
304+
/* CPU startup and info */
305+
struct seq_file;
306+
extern void early_trap_init(void);
307+
extern void collect_boot_cpu_data(void);
308+
extern int show_cpuinfo (struct seq_file *m, void *v);
309+
310+
/* driver code in driver/parisc */
311+
extern void gsc_init(void);
312+
extern void processor_init(void);
313+
extern void ccio_init(void);
314+
extern void hppb_init(void);
315+
extern void dino_init(void);
316+
extern void iosapic_init(void);
317+
extern void lba_init(void);
318+
extern void sba_init(void);
319+
extern void parisc_eisa_init(void);
320+
struct parisc_device;
321+
struct resource;
322+
extern void sba_distributed_lmmio(struct parisc_device *, struct resource *);
323+
extern void sba_directed_lmmio(struct parisc_device *, struct resource *);
324+
extern void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask);
325+
extern void ccio_cujo20_fixup(struct parisc_device *dev, u32 iovp);
326+
295327
#endif /* __ASSEMBLY__ */
296328

297329
#endif /* __ASM_PARISC_PROCESSOR_H */

arch/parisc/kernel/setup.c

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
4545
struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
4646
struct proc_dir_entry * proc_mckinley_root __read_mostly = NULL;
4747

48-
void __init setup_cmdline(char **cmdline_p)
48+
static void __init setup_cmdline(char **cmdline_p)
4949
{
5050
extern unsigned int boot_args[];
5151
char *p;
@@ -86,7 +86,7 @@ void __init setup_cmdline(char **cmdline_p)
8686
}
8787

8888
#ifdef CONFIG_PA11
89-
void __init dma_ops_init(void)
89+
static void __init dma_ops_init(void)
9090
{
9191
switch (boot_cpu_data.cpu_type) {
9292
case pcx:
@@ -106,8 +106,6 @@ void __init dma_ops_init(void)
106106
}
107107
#endif
108108

109-
extern void collect_boot_cpu_data(void);
110-
111109
void __init setup_arch(char **cmdline_p)
112110
{
113111
#ifdef CONFIG_64BIT
@@ -167,10 +165,7 @@ void __init setup_arch(char **cmdline_p)
167165

168166
/*
169167
* Display CPU info for all CPUs.
170-
* for parisc this is in processor.c
171168
*/
172-
extern int show_cpuinfo (struct seq_file *m, void *v);
173-
174169
static void *
175170
c_start (struct seq_file *m, loff_t *pos)
176171
{
@@ -295,16 +290,6 @@ static int __init parisc_init_resources(void)
295290
return 0;
296291
}
297292

298-
extern void gsc_init(void);
299-
extern void processor_init(void);
300-
extern void ccio_init(void);
301-
extern void hppb_init(void);
302-
extern void dino_init(void);
303-
extern void iosapic_init(void);
304-
extern void lba_init(void);
305-
extern void sba_init(void);
306-
extern void eisa_init(void);
307-
308293
static int __init parisc_init(void)
309294
{
310295
u32 osid = (OS_ID_LINUX << 16);
@@ -370,7 +355,7 @@ static int __init parisc_init(void)
370355
gsc_init();
371356
#endif
372357
#ifdef CONFIG_EISA
373-
eisa_init();
358+
parisc_eisa_init();
374359
#endif
375360

376361
#if defined(CONFIG_HPPB)
@@ -391,8 +376,6 @@ arch_initcall(parisc_init);
391376

392377
void __init start_parisc(void)
393378
{
394-
extern void early_trap_init(void);
395-
396379
int ret, cpunum;
397380
struct pdc_coproc_cfg coproc_cfg;
398381

drivers/parisc/dino.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,6 @@ static const char cujo_vers[][4] = {
924924
"2.0"
925925
};
926926

927-
void ccio_cujo20_fixup(struct parisc_device *dev, u32 iovp);
928-
929927
/*
930928
** Determine if dino should claim this chip (return 0) or not (return 1).
931929
** If so, initialize the chip appropriately (card-mode vs bridge mode).

drivers/parisc/eisa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ static struct parisc_driver eisa_driver __refdata = {
400400
.probe = eisa_probe,
401401
};
402402

403-
void __init eisa_init(void)
403+
void __init parisc_eisa_init(void)
404404
{
405405
register_parisc_driver(&eisa_driver);
406406
}

drivers/parisc/lba_pci.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,10 +1164,6 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
11641164
#endif /* CONFIG_64BIT */
11651165

11661166

1167-
extern void sba_distributed_lmmio(struct parisc_device *, struct resource *);
1168-
extern void sba_directed_lmmio(struct parisc_device *, struct resource *);
1169-
1170-
11711167
static void
11721168
lba_legacy_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
11731169
{

drivers/parisc/sba_iommu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,8 +1235,6 @@ struct ibase_data_struct {
12351235

12361236
static int setup_ibase_imask_callback(struct device *dev, void *data)
12371237
{
1238-
/* lba_set_iregs() is in drivers/parisc/lba_pci.c */
1239-
extern void lba_set_iregs(struct parisc_device *, u32, u32);
12401238
struct parisc_device *lba = to_parisc_device(dev);
12411239
struct ibase_data_struct *ibd = data;
12421240
int rope_num = (lba->hpa.start >> 13) & 0xf;

0 commit comments

Comments
 (0)