From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-m68k@lists.linux-m68k.org
Cc: Arnd Bergmann <arnd@arndb.de>, Finn Thain <fthain@linux-m68k.org>,
Michael Schmitz <schmitzmic@gmail.com>,
Philip Blundell <philb@gnu.org>,
Greg Ungerer <gerg@linux-m68k.org>,
Joshua Thompson <funaho@jurai.org>, Sam Creasey <sammy@sammy.net>,
Laurent Vivier <laurent@vivier.eu>,
linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH v2 32/52] m68k: mac: Add and use "mac.h"
Date: Wed, 13 Sep 2023 16:08:22 +0200 [thread overview]
Message-ID: <d1fe0014a9e472a305333de4fa17f335c93d73af.1694613528.git.geert@linux-m68k.org> (raw)
In-Reply-To: <cover.1694613528.git.geert@linux-m68k.org>
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>
---
v2:
- Add Acked-by.
---
arch/m68k/mac/baboon.c | 2 ++
arch/m68k/mac/config.c | 12 ++----------
arch/m68k/mac/iop.c | 2 ++
arch/m68k/mac/mac.h | 25 +++++++++++++++++++++++++
arch/m68k/mac/macboing.c | 2 ++
arch/m68k/mac/misc.c | 2 ++
arch/m68k/mac/oss.c | 2 ++
arch/m68k/mac/psc.c | 2 ++
arch/m68k/mac/via.c | 2 ++
9 files changed, 41 insertions(+), 10 deletions(-)
create mode 100644 arch/m68k/mac/mac.h
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index a7d280220662c747..5c97a7058bcdee2e 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 d56affefd5cabeb5..e324410ef239c09f 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 010b3b5ae8e8584a..a92740d530ac4fbe 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 0000000000000000..d3d142cea3b4b911
--- /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 76431241347682fc..faea2265a540192d 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 65107abc8848232c..4c8f8cbfa05f3404 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 921e6c092f2c6626..1641607f300d981c 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 0d0965b19c09b439..b4183cf66efef7f5 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 3d11d6219cdd56da..01e6b0e37f8dd0e8 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;
--
2.34.1
next prev parent reply other threads:[~2023-09-13 14:10 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 14:07 [PATCH v2 00/52] m68k: W=1 fixes Geert Uytterhoeven
2023-09-13 14:07 ` [PATCH v2 01/52] m68k: kernel: Add missing asmlinkage to do_notify_resume() Geert Uytterhoeven
2023-09-13 14:07 ` [PATCH v2 02/52] m68k: kernel: Include <linux/cpu.h> for trap_init() Geert Uytterhoeven
2023-09-13 14:07 ` [PATCH v2 03/52] m68k: kernel: Make bad_super_trap() static Geert Uytterhoeven
2023-09-13 14:07 ` [PATCH v2 04/52] m68k: kernel: Add and use <asm/syscalls.h> Geert Uytterhoeven
2023-09-13 14:07 ` [PATCH v2 05/52] m68k: kernel: Add and use "ints.h" Geert Uytterhoeven
2023-09-13 14:07 ` [PATCH v2 06/52] m68k: kernel: Add and use "process.h" Geert Uytterhoeven
2023-09-13 14:07 ` [PATCH v2 07/52] m68k: kernel: Add and use "ptrace.h" Geert Uytterhoeven
2023-09-13 14:07 ` [PATCH v2 08/52] m68k: kernel: Add and use "signal.h" Geert Uytterhoeven
2023-09-13 14:07 ` [PATCH v2 09/52] m68k: kernel: Add and use "traps.h" Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 10/52] m68k: kernel: Add and use "vectors.h" Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 11/52] m68k: mm: Include <asm/hwtest.h> for hwreg_() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 12/52] m68k: mm: Move paging_init() to common <asm/pgtable.h> Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 13/52] m68k: mm: Add and use "fault.h" Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 14/52] m68k: emu: Remove unused vsnprintf() return value in nfprint() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 15/52] m68k: emu: Mark version[] __maybe_unused Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 16/52] m68k: amiga: pcmcia: Replace set but not used variable by READ_ONCE() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 17/52] m68k: amiga: Add and use "amiga.h" Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 18/52] m68k: atari: Document data parameter of stdma_try_lock() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 19/52] m68k: atari: Make ikbd_reset() static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 20/52] m68k: atari: Make atari_platform_init() static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 21/52] m68k: atari: Make atari_stram_map_pages() static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 22/52] m68k: atari: Add and use "atari.h" Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 23/52] m68k: apollo: Remove unused debug console functions Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 24/52] m68k: apollo: Make local reset, serial, and irq functions static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 25/52] m68k: apollo: Replace set but not used variable by READ_ONCE() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 26/52] m68k: apollo: Add and use "apollo.h" Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 27/52] m68k: bvme6000: Make bvme6000_abort_int() static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 28/52] m68k: hp300: Include "time.h" for hp300_sched_init() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 29/52] m68k: mac: Remove unused sine_data[] Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 30/52] m68k: mac: Remove unused yday in unmktime() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 31/52] m68k: mac: Make mac_platform_init() static Geert Uytterhoeven
2023-09-13 14:08 ` Geert Uytterhoeven [this message]
2023-09-13 14:08 ` [PATCH v2 33/52] m68k: mvme147: Make mvme147_init_IRQ() static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 34/52] m68k: mvme16x: Remove unused sink in mvme16x_cons_write() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 35/52] m68k: mvme16x: Add and use "mvme16x.h" Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 36/52] m68k: q40: Add and use "q40.h" Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 37/52] m68k: sun3/3x: Include <asm/config.h> for config_sun3*() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 38/52] m68k: sun3: Improve Sun3/3x DVMA abstraction in <asm/dvma.h> Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 39/52] m68k: sun3: Fix context restore in flush_tlb_range() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 40/52] m68k: sun3: Fix signature of sun3_get_model() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 41/52] m68k: sun3: Add missing asmlinkage to sun3_init() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 42/52] m68k: sun3: Remove unused orig_baddr in free_baddr() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 43/52] m68k: sun3: Remove unused start_page in sun3_bootmem_alloc() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 44/52] m68k: sun3: Remove unused vsprintf() return value in prom_printf() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 45/52] m68k: sun3: Annotate prom_printf() with __printf() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 46/52] m68k: sun3: Make print_pte() static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 47/52] m68k: sun3: Make sun3_platform_init() static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 48/52] m68k: sun3x: Fix signature of sun3_leds() Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 49/52] m68k: sun3x: Do not mark dvma_map_iommu() inline Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 50/52] m68k: sun3x: Make sun3x_halt() static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 51/52] m68k: sun3x: Make dvma_print() static Geert Uytterhoeven
2023-09-13 14:08 ` [PATCH v2 52/52] m68k: sun3/3x: Add and use "sun3.h" Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1fe0014a9e472a305333de4fa17f335c93d73af.1694613528.git.geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=arnd@arndb.de \
--cc=fthain@linux-m68k.org \
--cc=funaho@jurai.org \
--cc=gerg@linux-m68k.org \
--cc=laurent@vivier.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=philb@gnu.org \
--cc=sammy@sammy.net \
--cc=schmitzmic@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®