m68k: amiga: Add and use "amiga.h"
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 13 Sep 2023 14:08:07 +0000 (16:08 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 6 Oct 2023 08:03:02 +0000 (10:03 +0200)
When building with W=1:

    arch/m68k/amiga/amisound.c:48:13: warning: no previous prototype for ‘amiga_init_sound’ [-Wmissing-prototypes]
       48 | void __init amiga_init_sound(void)
  |             ^~~~~~~~~~~~~~~~
    arch/m68k/amiga/amisound.c:71:6: warning: no previous prototype for ‘amiga_mksound’ [-Wmissing-prototypes]
       71 | void amiga_mksound( unsigned int hz, unsigned int ticks )
  |      ^~~~~~~~~~~~~

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

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/7e9395e1de1c9a34d16ea40a522057f05bbee400.1694613528.git.geert@linux-m68k.org
arch/m68k/amiga/amiga.h [new file with mode: 0644]
arch/m68k/amiga/amisound.c
arch/m68k/amiga/config.c

diff --git a/arch/m68k/amiga/amiga.h b/arch/m68k/amiga/amiga.h
new file mode 100644 (file)
index 0000000..0039278
--- /dev/null
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+/* amisound.c */
+void amiga_init_sound(void);
+void amiga_mksound(unsigned int hz, unsigned int ticks);
index 442bdeee6bd7920c9d6bb4e3edefc734951d072e..714fe8ec6afa33645178383d2923eb4267248849 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <asm/amigahw.h>
 
+#include "amiga.h"
+
 static unsigned short *snd_data;
 static const signed char sine_data[] = {
        0,  39,  75,  103,  121,  127,  121,  103,  75,  39,
index 3137b45750dfcea79f3997d84400f7167debeec2..7791673e547bf7955baf5a2f91f2754852d66810 100644 (file)
@@ -39,6 +39,8 @@
 #include <asm/io.h>
 #include <asm/config.h>
 
+#include "amiga.h"
+
 static unsigned long amiga_model;
 
 unsigned long amiga_eclock;
@@ -96,9 +98,7 @@ static char amiga_model_name[13] = "Amiga ";
 static void amiga_sched_init(void);
 static void amiga_get_model(char *model);
 static void amiga_get_hardware_list(struct seq_file *m);
-extern void amiga_mksound(unsigned int count, unsigned int ticks);
 static void amiga_reset(void);
-extern void amiga_init_sound(void);
 static void amiga_mem_console_write(struct console *co, const char *b,
                                    unsigned int count);
 #ifdef CONFIG_HEARTBEAT