Skip to content

Commit c50b1fc

Browse files
committed
m68k: sun3/3x: Add and use "sun3.h"
When building with W=1: arch/m68k/sun3/idprom.c:86:6: warning: no previous prototype for ‘sun3_get_model’ [-Wmissing-prototypes] 86 | void sun3_get_model(char *model) | ^~~~~~~~~~~~~~ arch/m68k/sun3/config.c:53:24: warning: no previous prototype for ‘sun3_init’ [-Wmissing-prototypes] 53 | asmlinkage void __init sun3_init(void) | ^~~~~~~~~ arch/m68k/sun3/mmu_emu.c:117:6: warning: no previous prototype for ‘print_pte_vaddr’ [-Wmissing-prototypes] 117 | void print_pte_vaddr (unsigned long vaddr) | ^~~~~~~~~~~~~~~ arch/m68k/sun3/mmu_emu.c:126:13: warning: no previous prototype for ‘mmu_emu_init’ [-Wmissing-prototypes] 126 | void __init mmu_emu_init(unsigned long bootmem_end) | ^~~~~~~~~~~~ arch/m68k/sun3/mmu_emu.c:353:5: warning: no previous prototype for ‘mmu_emu_handle_fault’ [-Wmissing-prototypes] 353 | int mmu_emu_handle_fault (unsigned long vaddr, int read_flag, int kernel_fault) | ^~~~~~~~~~~~~~~~~~~~ arch/m68k/sun3/leds.c:6:6: warning: no previous prototype for ‘sun3_leds’ [-Wmissing-prototypes] 6 | void sun3_leds(unsigned char byte) | ^~~~~~~~~ arch/m68k/sun3/intersil.c:27:5: warning: no previous prototype for ‘sun3_hwclk’ [-Wmissing-prototypes] 27 | int sun3_hwclk(int set, struct rtc_time *t) | ^~~~~~~~~~ arch/m68k/sun3x/config.c:30:6: warning: no previous prototype for ‘sun3_leds’ [-Wmissing-prototypes] 30 | void sun3_leds(unsigned char byte) | ^~~~~~~~~ Fix this by introducing a new header file "sun3.h" for holding the prototypes of functions implemented in arch/m68k/sun3/ and arch/m68k/sun3x/. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/87856ef9ef8955f459fb691faca921c0a688bc80.1694613528.git.geert@linux-m68k.org
1 parent f9b3463 commit c50b1fc

File tree

11 files changed

+36
-11
lines changed

11 files changed

+36
-11
lines changed

arch/m68k/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ static inline void access_error040(struct frame *fp)
364364
#if defined(CONFIG_SUN3)
365365
#include <asm/sun3mmu.h>
366366

367-
extern int mmu_emu_handle_fault (unsigned long, int, int);
367+
#include "../sun3/sun3.h"
368368

369369
/* sun3 version of bus_error030 */
370370

arch/m68k/mm/sun3kmap.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818
#include <asm/io.h>
1919
#include <asm/sun3mmu.h>
2020

21-
#undef SUN3_KMAP_DEBUG
21+
#include "../sun3/sun3.h"
2222

23-
#ifdef SUN3_KMAP_DEBUG
24-
extern void print_pte_vaddr(unsigned long vaddr);
25-
#endif
23+
#undef SUN3_KMAP_DEBUG
2624

2725
extern void mmu_emu_map_pmeg (int context, int vaddr);
2826

arch/m68k/mm/sun3mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <asm/machdep.h>
2525
#include <asm/io.h>
2626

27-
extern void mmu_emu_init (unsigned long bootmem_end);
27+
#include "../sun3/sun3.h"
2828

2929
const char bad_pmd_string[] = "Bad pmd in pte_alloc: %08lx\n";
3030

arch/m68k/sun3/config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
#include <asm/sun3ints.h>
3636
#include <asm/config.h>
3737

38+
#include "sun3.h"
39+
3840
char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
3941

4042
static void sun3_sched_init(void);
41-
extern void sun3_get_model (char* model);
42-
extern int sun3_hwclk(int set, struct rtc_time *t);
4343

4444
volatile char* clock_va;
4545
extern unsigned long availmem;

arch/m68k/sun3/idprom.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <asm/idprom.h>
1818
#include <asm/machines.h> /* Fun with Sun released architectures. */
1919

20+
#include "sun3.h"
21+
2022
struct idprom *idprom;
2123
EXPORT_SYMBOL(idprom);
2224

arch/m68k/sun3/intersil.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <asm/intersil.h>
1818
#include <asm/machdep.h>
1919

20+
#include "sun3.h"
2021

2122
/* bits to set for start/run of the intersil */
2223
#define STOP_VAL (INTERSIL_STOP | INTERSIL_INT_ENABLE | INTERSIL_24H_MODE)

arch/m68k/sun3/leds.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include <asm/sun3mmu.h>
44
#include <asm/io.h>
55

6+
#include "sun3.h"
7+
68
void sun3_leds(unsigned char byte)
79
{
810
unsigned char dfc;

arch/m68k/sun3/mmu_emu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <asm/mmu_context.h>
2828
#include <asm/dvma.h>
2929

30+
#include "sun3.h"
3031

3132
#undef DEBUG_MMU_EMU
3233
#define DEBUG_PROM_MAPS

arch/m68k/sun3/sun3.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#include <linux/linkage.h>
4+
5+
struct rtc_time;
6+
7+
/* config.c */
8+
asmlinkage void sun3_init(void);
9+
10+
/* idprom.c */
11+
void sun3_get_model(char *model);
12+
13+
/* intersil.c */
14+
int sun3_hwclk(int set, struct rtc_time *t);
15+
16+
/* leds.c */
17+
void sun3_leds(unsigned char byte);
18+
19+
/* mmu_emu.c */
20+
void mmu_emu_init(unsigned long bootmem_end);
21+
int mmu_emu_handle_fault(unsigned long vaddr, int read_flag, int kernel_fault);
22+
void print_pte_vaddr(unsigned long vaddr);

arch/m68k/sun3/sun3ints.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <asm/irq_regs.h>
1818
#include <linux/seq_file.h>
1919

20-
extern void sun3_leds (unsigned char);
20+
#include "sun3.h"
2121

2222
void sun3_disable_interrupts(void)
2323
{

0 commit comments

Comments
 (0)