Skip to content

Commit 5642236

Browse files
committed
m68k: atari: Add and use "atari.h"
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> Link: https://lore.kernel.org/r/336e4a478ccbfd7e3e91cdbd27636947587a23a6.1694613528.git.geert@linux-m68k.org
1 parent 839ff34 commit 5642236

5 files changed

Lines changed: 21 additions & 11 deletions

File tree

arch/m68k/atari/ataints.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#include <asm/entry.h>
5353
#include <asm/io.h>
5454

55+
#include "atari.h"
5556

5657
/*
5758
* Atari interrupt handling scheme:
@@ -81,8 +82,6 @@ __ALIGN_STR "\n\t"
8182
"orw #0x200,%sp@\n\t" /* set saved ipl to 2 */
8283
"rte");
8384

84-
extern void atari_microwire_cmd(int cmd);
85-
8685
static unsigned int atari_irq_startup(struct irq_data *data)
8786
{
8887
unsigned int irq = data->irq;

arch/m68k/atari/atari.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+
struct rtc_time;
4+
5+
/* ataints.c */
6+
void atari_init_IRQ(void);
7+
8+
/* atasound.c */
9+
void atari_microwire_cmd(int cmd);
10+
void atari_mksound(unsigned int hz, unsigned int ticks);
11+
12+
/* time.c */
13+
void atari_sched_init(void);
14+
int atari_mste_hwclk(int op, struct rtc_time *t);
15+
int atari_tt_hwclk(int op, struct rtc_time *t);

arch/m68k/atari/atasound.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <asm/irq.h>
2929
#include <asm/atariints.h>
3030

31+
#include "atari.h"
3132

3233
/*
3334
* stuff from the old atasound.c

arch/m68k/atari/config.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
#include <asm/io.h>
4949
#include <asm/config.h>
5050

51+
#include "atari.h"
52+
5153
u_long atari_mch_cookie;
5254
EXPORT_SYMBOL(atari_mch_cookie);
5355

@@ -69,19 +71,10 @@ int atari_rtc_year_offset;
6971
static void atari_reset(void);
7072
static void atari_get_model(char *model);
7173
static void atari_get_hardware_list(struct seq_file *m);
72-
73-
/* atari specific irq functions */
74-
extern void atari_init_IRQ (void);
75-
extern void atari_mksound(unsigned int count, unsigned int ticks);
7674
#ifdef CONFIG_HEARTBEAT
7775
static void atari_heartbeat(int on);
7876
#endif
7977

80-
/* atari specific timer functions (in time.c) */
81-
extern void atari_sched_init(void);
82-
extern int atari_mste_hwclk (int, struct rtc_time *);
83-
extern int atari_tt_hwclk (int, struct rtc_time *);
84-
8578
/* ++roman: This is a more elaborate test for an SCC chip, since the plain
8679
* Medusa board generates DTACK at the SCC's standard addresses, but a SCC
8780
* board in the Medusa is possible. Also, the addresses where the ST_ESCC

arch/m68k/atari/time.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include <asm/atariints.h>
2424
#include <asm/machdep.h>
2525

26+
#include "atari.h"
27+
2628
DEFINE_SPINLOCK(rtc_lock);
2729
EXPORT_SYMBOL_GPL(rtc_lock);
2830

0 commit comments

Comments
 (0)