mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 22/52] m68k: atari: Add and use "atari.h"
Date: Wed, 13 Sep 2023 16:08:12 +0200	[thread overview]
Message-ID: <336e4a478ccbfd7e3e91cdbd27636947587a23a6.1694613528.git.geert@linux-m68k.org> (raw)
In-Reply-To: <cover.1694613528.git.geert@linux-m68k.org>

When building with W=1:

    arch/m68k/atari/time.c:59:1: warning: no previous prototype for ‘atari_sched_init’ [-Wmissing-prototypes]
       59 | atari_sched_init(void)
	  | ^~~~~~~~~~~~~~~~
    arch/m68k/atari/time.c:140:5: warning: no previous prototype for ‘atari_mste_hwclk’ [-Wmissing-prototypes]
      140 | int atari_mste_hwclk( int op, struct rtc_time *t )
	  |     ^~~~~~~~~~~~~~~~
    arch/m68k/atari/time.c:199:5: warning: no previous prototype for ‘atari_tt_hwclk’ [-Wmissing-prototypes]
      199 | int atari_tt_hwclk( int op, struct rtc_time *t )
	  |     ^~~~~~~~~~~~~~
    arch/m68k/atari/ataints.c:267:13: warning: no previous prototype for ‘atari_init_IRQ’ [-Wmissing-prototypes]
      267 | void __init atari_init_IRQ(void)
	  |             ^~~~~~~~~~~~~~
    arch/m68k/atari/atasound.c:36:6: warning: no previous prototype for ‘atari_microwire_cmd’ [-Wmissing-prototypes]
       36 | void atari_microwire_cmd (int cmd)
	  |      ^~~~~~~~~~~~~~~~~~~
    arch/m68k/atari/atasound.c:53:6: warning: no previous prototype for ‘atari_mksound’ [-Wmissing-prototypes]
       53 | void atari_mksound (unsigned int hz, unsigned int ticks)
	  |      ^~~~~~~~~~~~~

Fix this by introducing a new header file "atari.h" for holding the
prototypes of functions implemented in arch/m68k/atari/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2:
  - Add Acked-by.
---
 arch/m68k/atari/ataints.c  |  3 +--
 arch/m68k/atari/atari.h    | 15 +++++++++++++++
 arch/m68k/atari/atasound.c |  1 +
 arch/m68k/atari/config.c   | 11 ++---------
 arch/m68k/atari/time.c     |  2 ++
 5 files changed, 21 insertions(+), 11 deletions(-)
 create mode 100644 arch/m68k/atari/atari.h

diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index 56f02ea2c248d844..23256434191c39af 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -52,6 +52,7 @@
 #include <asm/entry.h>
 #include <asm/io.h>
 
+#include "atari.h"
 
 /*
  * Atari interrupt handling scheme:
@@ -81,8 +82,6 @@ __ALIGN_STR "\n\t"
 	"orw	#0x200,%sp@\n\t"	/* set saved ipl to 2 */
 	"rte");
 
-extern void atari_microwire_cmd(int cmd);
-
 static unsigned int atari_irq_startup(struct irq_data *data)
 {
 	unsigned int irq = data->irq;
diff --git a/arch/m68k/atari/atari.h b/arch/m68k/atari/atari.h
new file mode 100644
index 0000000000000000..494a03ddac3d16ae
--- /dev/null
+++ b/arch/m68k/atari/atari.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+struct rtc_time;
+
+/* ataints.c */
+void atari_init_IRQ(void);
+
+/* atasound.c */
+void atari_microwire_cmd(int cmd);
+void atari_mksound(unsigned int hz, unsigned int ticks);
+
+/* time.c */
+void atari_sched_init(void);
+int atari_mste_hwclk(int op, struct rtc_time *t);
+int atari_tt_hwclk(int op, struct rtc_time *t);
diff --git a/arch/m68k/atari/atasound.c b/arch/m68k/atari/atasound.c
index a8724d998c39fcfa..c38ef0e6078e7260 100644
--- a/arch/m68k/atari/atasound.c
+++ b/arch/m68k/atari/atasound.c
@@ -28,6 +28,7 @@
 #include <asm/irq.h>
 #include <asm/atariints.h>
 
+#include "atari.h"
 
 /*
  * stuff from the old atasound.c
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index b4fe4273ad912ebe..b48a0606a00068b9 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -48,6 +48,8 @@
 #include <asm/io.h>
 #include <asm/config.h>
 
+#include "atari.h"
+
 u_long atari_mch_cookie;
 EXPORT_SYMBOL(atari_mch_cookie);
 
@@ -69,19 +71,10 @@ int atari_rtc_year_offset;
 static void atari_reset(void);
 static void atari_get_model(char *model);
 static void atari_get_hardware_list(struct seq_file *m);
-
-/* atari specific irq functions */
-extern void atari_init_IRQ (void);
-extern void atari_mksound(unsigned int count, unsigned int ticks);
 #ifdef CONFIG_HEARTBEAT
 static void atari_heartbeat(int on);
 #endif
 
-/* atari specific timer functions (in time.c) */
-extern void atari_sched_init(void);
-extern int atari_mste_hwclk (int, struct rtc_time *);
-extern int atari_tt_hwclk (int, struct rtc_time *);
-
 /* ++roman: This is a more elaborate test for an SCC chip, since the plain
  * Medusa board generates DTACK at the SCC's standard addresses, but a SCC
  * board in the Medusa is possible. Also, the addresses where the ST_ESCC
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c
index 7e44d0e9d0f8a902..3453c6dc6b41d3c9 100644
--- a/arch/m68k/atari/time.c
+++ b/arch/m68k/atari/time.c
@@ -23,6 +23,8 @@
 #include <asm/atariints.h>
 #include <asm/machdep.h>
 
+#include "atari.h"
+
 DEFINE_SPINLOCK(rtc_lock);
 EXPORT_SYMBOL_GPL(rtc_lock);
 
-- 
2.34.1


  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 ` Geert Uytterhoeven [this message]
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 ` [PATCH v2 32/52] m68k: mac: Add and use "mac.h" Geert Uytterhoeven
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=336e4a478ccbfd7e3e91cdbd27636947587a23a6.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®