Skip to content

Commit c43278f

Browse files
committed
m68k: mac: Add and use "mac.h"
When building with W=1: arch/m68k/mac/iop.c:235:13: warning: no previous prototype for ‘iop_init’ [-Wmissing-prototypes] 235 | void __init iop_init(void) | ^~~~~~~~ arch/m68k/mac/via.c:112:13: warning: no previous prototype for ‘via_init’ [-Wmissing-prototypes] 111 | void __init via_init(void) | ^~~~~~~~ arch/m68k/mac/via.c:623:13: warning: no previous prototype for ‘via_init_clock’ [-Wmissing-prototypes] 593 | void __init via_init_clock(void) | ^~~~~~~~~~~~~~ arch/m68k/mac/oss.c:37:13: warning: no previous prototype for ‘oss_init’ [-Wmissing-prototypes] 37 | void __init oss_init(void) | ^~~~~~~~ arch/m68k/mac/psc.c:76:13: warning: no previous prototype for ‘psc_init’ [-Wmissing-prototypes] 76 | void __init psc_init(void) | ^~~~~~~~ arch/m68k/mac/baboon.c:25:13: warning: no previous prototype for ‘baboon_init’ [-Wmissing-prototypes] 25 | void __init baboon_init(void) | ^~~~~~~~~~~ arch/m68k/mac/macboing.c:155:6: warning: no previous prototype for ‘mac_mksound’ [-Wmissing-prototypes] 155 | void mac_mksound( unsigned int freq, unsigned int length ) | ^~~~~~~~~~~ arch/m68k/mac/misc.c:608:5: warning: no previous prototype for ‘mac_hwclk’ [-Wmissing-prototypes] 608 | int mac_hwclk(int op, struct rtc_time *t) | ^~~~~~~~~ Fix this by introducing a new header file "mac.h" for holding the prototypes of functions implemented in arch/m68k/mac/. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/d1fe0014a9e472a305333de4fa17f335c93d73af.1694613528.git.geert@linux-m68k.org
1 parent a53652f commit c43278f

9 files changed

Lines changed: 41 additions & 10 deletions

File tree

arch/m68k/mac/baboon.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <asm/macints.h>
1616
#include <asm/mac_baboon.h>
1717

18+
#include "mac.h"
19+
1820
int baboon_present;
1921
static volatile struct baboon *baboon;
2022

arch/m68k/mac/config.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,14 @@
5050
#include <asm/mac_psc.h>
5151
#include <asm/config.h>
5252

53+
#include "mac.h"
54+
5355
/* Mac bootinfo struct */
5456
struct mac_booter_data mac_bi_data;
5557

5658
/* The phys. video addr. - might be bogus on some machines */
5759
static unsigned long mac_orig_videoaddr;
5860

59-
extern int mac_hwclk(int, struct rtc_time *);
60-
extern void iop_init(void);
61-
extern void via_init(void);
62-
extern void via_init_clock(void);
63-
extern void oss_init(void);
64-
extern void psc_init(void);
65-
extern void baboon_init(void);
66-
67-
extern void mac_mksound(unsigned int, unsigned int);
68-
6961
static void mac_get_model(char *str);
7062
static void mac_identify(void);
7163
static void mac_report_hardware(void);

arch/m68k/mac/iop.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@
119119
#include <asm/macints.h>
120120
#include <asm/mac_iop.h>
121121

122+
#include "mac.h"
123+
122124
#ifdef DEBUG
123125
#define iop_pr_debug(fmt, ...) \
124126
printk(KERN_DEBUG "%s: " fmt, __func__, ##__VA_ARGS__)

arch/m68k/mac/mac.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
struct rtc_time;
4+
5+
/* baboon.c */
6+
void baboon_init(void);
7+
8+
/* iop.c */
9+
void iop_init(void);
10+
11+
/* misc.c */
12+
int mac_hwclk(int op, struct rtc_time *t);
13+
14+
/* macboing.c */
15+
void mac_mksound(unsigned int freq, unsigned int length);
16+
17+
/* oss.c */
18+
void oss_init(void);
19+
20+
/* psc.c */
21+
void psc_init(void);
22+
23+
/* via.c */
24+
void via_init(void);
25+
void via_init_clock(void);

arch/m68k/mac/macboing.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include <asm/macintosh.h>
1717
#include <asm/mac_asc.h>
1818

19+
#include "mac.h"
20+
1921
static int mac_asc_inited;
2022
/*
2123
* dumb triangular wave table

arch/m68k/mac/misc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
#include <asm/machdep.h>
2727

28+
#include "mac.h"
29+
2830
/*
2931
* Offset between Unix time (1970-based) and Mac time (1904-based). Cuda and PMU
3032
* times wrap in 2040. If we need to handle later times, the read_time functions

arch/m68k/mac/oss.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#include <asm/mac_via.h>
2828
#include <asm/mac_oss.h>
2929

30+
#include "mac.h"
31+
3032
int oss_present;
3133
volatile struct mac_oss *oss;
3234

arch/m68k/mac/psc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include <asm/macints.h>
2727
#include <asm/mac_psc.h>
2828

29+
#include "mac.h"
30+
2931
#define DEBUG_PSC
3032

3133
volatile __u8 *psc;

arch/m68k/mac/via.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
#include <asm/mac_psc.h>
3939
#include <asm/mac_oss.h>
4040

41+
#include "mac.h"
42+
4143
volatile __u8 *via1, *via2;
4244
int rbv_present;
4345
int via_alt_mapping;

0 commit comments

Comments
 (0)