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

m68k: Kill several external declarations in source files

- Replace external declarations by proper includes where availiable.
The accesses to some symbols had to be modified, as before they were
declared using e.g. "extern int _end", while asm-generic/sections.h uses
e.g. "extern char _end[]"
- Remove unused or superfluous external declarations

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

+14 -56
-4
arch/m68k/apollo/config.c
··· 31 31 extern int dn_dummy_hwclk(int, struct rtc_time *); 32 32 extern int dn_dummy_set_clock_mmss(unsigned long); 33 33 extern void dn_dummy_reset(void); 34 - extern void dn_dummy_waitbut(void); 35 - extern struct fb_info *dn_fb_init(long *); 36 - extern void dn_dummy_debug_init(void); 37 - extern irqreturn_t dn_process_int(int irq, struct pt_regs *fp); 38 34 #ifdef CONFIG_HEARTBEAT 39 35 static void dn_heartbeat(int on); 40 36 #endif
-1
arch/m68k/atari/atakeyb.c
··· 33 33 #include <asm/atari_joystick.h> 34 34 #include <asm/irq.h> 35 35 36 - extern unsigned int keymap_count; 37 36 38 37 /* Hook for MIDI serial driver */ 39 38 void (*atari_MIDI_interrupt_hook) (void);
-1
arch/m68k/bvme6000/config.c
··· 43 43 extern int bvme6000_hwclk (int, struct rtc_time *); 44 44 extern int bvme6000_set_clock_mmss (unsigned long); 45 45 extern void bvme6000_reset (void); 46 - extern void bvme6000_waitbut(void); 47 46 void bvme6000_set_vectors (void); 48 47 49 48 /* Save tick handler routine pointer, will point to do_timer() in
+5 -6
arch/m68k/kernel/setup.c
··· 26 26 #include <linux/initrd.h> 27 27 28 28 #include <asm/bootinfo.h> 29 + #include <asm/sections.h> 29 30 #include <asm/setup.h> 30 31 #include <asm/fpu.h> 31 32 #include <asm/irq.h> ··· 63 62 int m68k_is040or060; 64 63 EXPORT_SYMBOL(m68k_is040or060); 65 64 66 - extern int end; 67 65 extern unsigned long availmem; 68 66 69 67 int m68k_num_memory; ··· 215 215 216 216 void __init setup_arch(char **cmdline_p) 217 217 { 218 - extern int _etext, _edata, _end; 219 218 int i; 220 219 221 220 /* The bootinfo is located right after the kernel bss */ 222 - m68k_parse_bootinfo((const struct bi_record *)&_end); 221 + m68k_parse_bootinfo((const struct bi_record *)_end); 223 222 224 223 if (CPU_IS_040) 225 224 m68k_is040or060 = 4; ··· 251 252 } 252 253 253 254 init_mm.start_code = PAGE_OFFSET; 254 - init_mm.end_code = (unsigned long) &_etext; 255 - init_mm.end_data = (unsigned long) &_edata; 256 - init_mm.brk = (unsigned long) &_end; 255 + init_mm.end_code = (unsigned long)_etext; 256 + init_mm.end_data = (unsigned long)_edata; 257 + init_mm.brk = (unsigned long)_end; 257 258 258 259 *cmdline_p = m68k_command_line; 259 260 memcpy(boot_command_line, *cmdline_p, CL_SIZE);
-12
arch/m68k/mac/config.c
··· 47 47 48 48 struct mac_booter_data mac_bi_data; 49 49 50 - /* New m68k bootinfo stuff and videobase */ 51 - 52 - extern int m68k_num_memory; 53 - extern struct mem_info m68k_memory[NUM_MEMINFO]; 54 - 55 - extern struct mem_info m68k_ramdisk; 56 - 57 50 /* The phys. video addr. - might be bogus on some machines */ 58 51 static unsigned long mac_orig_videoaddr; 59 52 ··· 54 61 extern unsigned long mac_gettimeoffset(void); 55 62 extern int mac_hwclk(int, struct rtc_time *); 56 63 extern int mac_set_clock_mmss(unsigned long); 57 - extern int show_mac_interrupts(struct seq_file *, void *); 58 64 extern void iop_preinit(void); 59 65 extern void iop_init(void); 60 66 extern void via_init(void); ··· 797 805 mac_bi_data.boottime, mac_bi_data.gmtbias); 798 806 printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n", 799 807 mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); 800 - #if 0 801 - printk("Ramdisk: addr 0x%lx size 0x%lx\n", 802 - m68k_ramdisk.addr, m68k_ramdisk.size); 803 - #endif 804 808 805 809 iop_init(); 806 810 via_init();
-1
arch/m68k/mac/debug.c
··· 27 27 #include <asm/macints.h> 28 28 29 29 extern unsigned long mac_videobase; 30 - extern unsigned long mac_videodepth; 31 30 extern unsigned long mac_rowbytes; 32 31 33 32 extern void mac_serial_print(const char *);
+1 -9
arch/m68k/mac/macints.c
··· 134 134 #include <asm/errno.h> 135 135 #include <asm/macints.h> 136 136 #include <asm/irq_regs.h> 137 + #include <asm/mac_oss.h> 137 138 138 139 #define DEBUG_SPURIOUS 139 140 #define SHUTUP_SONIC ··· 147 146 * VIA/RBV hooks 148 147 */ 149 148 150 - extern void via_init(void); 151 149 extern void via_register_interrupts(void); 152 150 extern void via_irq_enable(int); 153 151 extern void via_irq_disable(int); ··· 157 157 * OSS hooks 158 158 */ 159 159 160 - extern int oss_present; 161 - 162 - extern void oss_init(void); 163 160 extern void oss_register_interrupts(void); 164 161 extern void oss_irq_enable(int); 165 162 extern void oss_irq_disable(int); ··· 167 170 * PSC hooks 168 171 */ 169 172 170 - extern int psc_present; 171 - 172 - extern void psc_init(void); 173 173 extern void psc_register_interrupts(void); 174 174 extern void psc_irq_enable(int); 175 175 extern void psc_irq_disable(int); ··· 185 191 186 192 extern int baboon_present; 187 193 188 - extern void baboon_init(void); 189 194 extern void baboon_register_interrupts(void); 190 195 extern void baboon_irq_enable(int); 191 196 extern void baboon_irq_disable(int); 192 197 extern void baboon_irq_clear(int); 193 - extern int baboon_irq_pending(int); 194 198 195 199 /* 196 200 * SCC interrupt routines
-1
arch/m68k/mac/misc.c
··· 35 35 36 36 #define RTC_OFFSET 2082844800 37 37 38 - extern struct mac_booter_data mac_bi_data; 39 38 static void (*rom_reset)(void); 40 39 41 40 #ifdef CONFIG_ADB_CUDA
+1 -1
arch/m68k/mac/via.c
··· 34 34 #include <asm/macints.h> 35 35 #include <asm/mac_via.h> 36 36 #include <asm/mac_psc.h> 37 + #include <asm/mac_oss.h> 37 38 38 39 volatile __u8 *via1, *via2; 39 40 int rbv_present; ··· 85 84 void via_irq_clear(int irq); 86 85 87 86 extern irqreturn_t mac_scc_dispatch(int, void *); 88 - extern int oss_present; 89 87 90 88 /* 91 89 * Initialize the VIAs
-1
arch/m68k/math-emu/fp_log.c
··· 24 24 25 25 extern struct fp_ext *fp_fadd(struct fp_ext *dest, const struct fp_ext *src); 26 26 extern struct fp_ext *fp_fdiv(struct fp_ext *dest, const struct fp_ext *src); 27 - extern struct fp_ext *fp_fmul(struct fp_ext *dest, const struct fp_ext *src); 28 27 29 28 struct fp_ext * 30 29 fp_fsqrt(struct fp_ext *dest, struct fp_ext *src)
+1 -3
arch/m68k/mm/init.c
··· 28 28 #ifdef CONFIG_ATARI 29 29 #include <asm/atari_stram.h> 30 30 #endif 31 + #include <asm/sections.h> 31 32 #include <asm/tlb.h> 32 33 33 34 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); ··· 73 72 extern void init_pointer_table(unsigned long ptable); 74 73 75 74 /* References to section boundaries */ 76 - 77 - extern char _text[], _etext[]; 78 - extern char __init_begin[], __init_end[]; 79 75 80 76 extern pmd_t *zero_pgtable; 81 77
+3 -4
arch/m68k/mm/motorola.c
··· 30 30 #ifdef CONFIG_ATARI 31 31 #include <asm/atari_stram.h> 32 32 #endif 33 + #include <asm/sections.h> 33 34 34 35 #undef DEBUG 35 36 ··· 302 301 } 303 302 } 304 303 305 - extern char __init_begin, __init_end; 306 - 307 304 void free_initmem(void) 308 305 { 309 306 unsigned long addr; 310 307 311 - addr = (unsigned long)&__init_begin; 312 - for (; addr < (unsigned long)&__init_end; addr += PAGE_SIZE) { 308 + addr = (unsigned long)__init_begin; 309 + for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) { 313 310 virt_to_page(addr)->flags &= ~(1 << PG_reserved); 314 311 init_page_count(virt_to_page(addr)); 315 312 free_page(addr);
-1
arch/m68k/mvme147/config.c
··· 42 42 extern int mvme147_hwclk (int, struct rtc_time *); 43 43 extern int mvme147_set_clock_mmss (unsigned long); 44 44 extern void mvme147_reset (void); 45 - extern void mvme147_waitbut(void); 46 45 47 46 48 47 static int bcd2int (unsigned char b);
-1
arch/m68k/mvme16x/config.c
··· 48 48 extern int mvme16x_hwclk (int, struct rtc_time *); 49 49 extern int mvme16x_set_clock_mmss (unsigned long); 50 50 extern void mvme16x_reset (void); 51 - extern void mvme16x_waitbut(void); 52 51 53 52 int bcd2int (unsigned char b); 54 53
-3
arch/m68k/q40/config.c
··· 36 36 #include <asm/machdep.h> 37 37 #include <asm/q40_master.h> 38 38 39 - extern irqreturn_t q40_process_int(int level, struct pt_regs *regs); 40 39 extern void q40_init_IRQ(void); 41 40 static void q40_get_model(char *model); 42 41 extern void q40_sched_init(irq_handler_t handler); ··· 46 47 static int q40_set_clock_mmss(unsigned long); 47 48 static int q40_get_rtc_pll(struct rtc_pll_info *pll); 48 49 static int q40_set_rtc_pll(struct rtc_pll_info *pll); 49 - extern void q40_waitbut(void); 50 - void q40_set_vectors(void); 51 50 52 51 extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/); 53 52
+3 -5
arch/m68k/sun3/config.c
··· 27 27 #include <asm/sun3mmu.h> 28 28 #include <asm/rtc.h> 29 29 #include <asm/machdep.h> 30 + #include <asm/idprom.h> 30 31 #include <asm/intersil.h> 31 32 #include <asm/irq.h> 33 + #include <asm/sections.h> 32 34 #include <asm/segment.h> 33 35 #include <asm/sun3ints.h> 34 - 35 - extern char _text, _end; 36 36 37 37 char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; 38 38 39 39 extern unsigned long sun3_gettimeoffset(void); 40 40 static void sun3_sched_init(irq_handler_t handler); 41 41 extern void sun3_get_model (char* model); 42 - extern void idprom_init (void); 43 42 extern int sun3_hwclk(int set, struct rtc_time *t); 44 43 45 44 volatile char* clock_va; 46 - extern volatile unsigned char* sun3_intreg; 47 45 extern unsigned long availmem; 48 46 unsigned long num_pages; 49 47 ··· 147 149 mach_halt = sun3_halt; 148 150 mach_get_hardware_list = sun3_get_hardware_list; 149 151 150 - memory_start = ((((int)&_end) + 0x2000) & ~0x1fff); 152 + memory_start = ((((unsigned long)_end) + 0x2000) & ~0x1fff); 151 153 // PROM seems to want the last couple of physical pages. --m 152 154 memory_end = *(romvec->pv_sun3mem) + PAGE_OFFSET - 2*PAGE_SIZE; 153 155
-1
arch/m68k/sun3/mmu_emu.c
··· 27 27 #include <asm/mmu_context.h> 28 28 #include <asm/dvma.h> 29 29 30 - extern void prom_reboot (char *) __attribute__ ((__noreturn__)); 31 30 32 31 #undef DEBUG_MMU_EMU 33 32 #define DEBUG_PROM_MAPS
-1
arch/m68k/sun3x/config.c
··· 23 23 #include "time.h" 24 24 25 25 volatile char *clock_va; 26 - extern volatile unsigned char *sun3_intreg; 27 26 28 27 extern void sun3_get_model(char *model); 29 28