diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2023-09-13 16:08:22 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2023-10-06 10:03:03 +0200 |
commit | c43278f073c920a18af9721fb620c05f6826ff13 (patch) | |
tree | b49453ba84dbf4b16626c17b3773818d0e607242 /arch/m68k/mac | |
parent | a53652fa78dd8db22aa1420899903f96b2b84f11 (diff) |
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
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r-- | arch/m68k/mac/baboon.c | 2 | ||||
-rw-r--r-- | arch/m68k/mac/config.c | 12 | ||||
-rw-r--r-- | arch/m68k/mac/iop.c | 2 | ||||
-rw-r--r-- | arch/m68k/mac/mac.h | 25 | ||||
-rw-r--r-- | arch/m68k/mac/macboing.c | 2 | ||||
-rw-r--r-- | arch/m68k/mac/misc.c | 2 | ||||
-rw-r--r-- | arch/m68k/mac/oss.c | 2 | ||||
-rw-r--r-- | arch/m68k/mac/psc.c | 2 | ||||
-rw-r--r-- | arch/m68k/mac/via.c | 2 |
9 files changed, 41 insertions, 10 deletions
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index a7d280220662..5c97a7058bcd 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c @@ -15,6 +15,8 @@ #include <asm/macints.h> #include <asm/mac_baboon.h> +#include "mac.h" + int baboon_present; static volatile struct baboon *baboon; diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index d56affefd5ca..e324410ef239 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -50,22 +50,14 @@ #include <asm/mac_psc.h> #include <asm/config.h> +#include "mac.h" + /* Mac bootinfo struct */ struct mac_booter_data mac_bi_data; /* The phys. video addr. - might be bogus on some machines */ static unsigned long mac_orig_videoaddr; -extern int mac_hwclk(int, struct rtc_time *); -extern void iop_init(void); -extern void via_init(void); -extern void via_init_clock(void); -extern void oss_init(void); -extern void psc_init(void); -extern void baboon_init(void); - -extern void mac_mksound(unsigned int, unsigned int); - static void mac_get_model(char *str); static void mac_identify(void); static void mac_report_hardware(void); diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index 010b3b5ae8e8..a92740d530ac 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c @@ -119,6 +119,8 @@ #include <asm/macints.h> #include <asm/mac_iop.h> +#include "mac.h" + #ifdef DEBUG #define iop_pr_debug(fmt, ...) \ printk(KERN_DEBUG "%s: " fmt, __func__, ##__VA_ARGS__) diff --git a/arch/m68k/mac/mac.h b/arch/m68k/mac/mac.h new file mode 100644 index 000000000000..d3d142cea3b4 --- /dev/null +++ b/arch/m68k/mac/mac.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +struct rtc_time; + +/* baboon.c */ +void baboon_init(void); + +/* iop.c */ +void iop_init(void); + +/* misc.c */ +int mac_hwclk(int op, struct rtc_time *t); + +/* macboing.c */ +void mac_mksound(unsigned int freq, unsigned int length); + +/* oss.c */ +void oss_init(void); + +/* psc.c */ +void psc_init(void); + +/* via.c */ +void via_init(void); +void via_init_clock(void); diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c index 764312413476..faea2265a540 100644 --- a/arch/m68k/mac/macboing.c +++ b/arch/m68k/mac/macboing.c @@ -16,6 +16,8 @@ #include <asm/macintosh.h> #include <asm/mac_asc.h> +#include "mac.h" + static int mac_asc_inited; /* * dumb triangular wave table diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index 65107abc8848..4c8f8cbfa05f 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c @@ -25,6 +25,8 @@ #include <asm/machdep.h> +#include "mac.h" + /* * Offset between Unix time (1970-based) and Mac time (1904-based). Cuda and PMU * times wrap in 2040. If we need to handle later times, the read_time functions diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index 921e6c092f2c..1641607f300d 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c @@ -27,6 +27,8 @@ #include <asm/mac_via.h> #include <asm/mac_oss.h> +#include "mac.h" + int oss_present; volatile struct mac_oss *oss; diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c index 0d0965b19c09..b4183cf66efe 100644 --- a/arch/m68k/mac/psc.c +++ b/arch/m68k/mac/psc.c @@ -26,6 +26,8 @@ #include <asm/macints.h> #include <asm/mac_psc.h> +#include "mac.h" + #define DEBUG_PSC volatile __u8 *psc; diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index 3d11d6219cdd..01e6b0e37f8d 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c @@ -38,6 +38,8 @@ #include <asm/mac_psc.h> #include <asm/mac_oss.h> +#include "mac.h" + volatile __u8 *via1, *via2; int rbv_present; int via_alt_mapping; |