Skip to content

Commit bbe6980

Browse files
committed
m68k: q40: Add and use "q40.h"
When building with W=1: arch/m68k/q40/q40ints.c:84:13: warning: no previous prototype for ‘q40_init_IRQ’ [-Wmissing-prototypes] 84 | void __init q40_init_IRQ(void) | ^~~~~~~~~~~~ arch/m68k/q40/q40ints.c:112:6: warning: no previous prototype for ‘q40_mksound’ [-Wmissing-prototypes] 112 | void q40_mksound(unsigned int hz, unsigned int ticks) | ^~~~~~~~~~~ arch/m68k/q40/q40ints.c:152:6: warning: no previous prototype for ‘q40_sched_init’ [-Wmissing-prototypes] 152 | void q40_sched_init (void) | ^~~~~~~~~~~~~~ Fix this by introducing a new header file "q40.h" for holding the prototypes of functions implemented in arch/m68k/q40/. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/7f983ce079b176e1e1ac2a7d0c35b36197c5fa6b.1694613528.git.geert@linux-m68k.org
1 parent dcec33c commit bbe6980

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

arch/m68k/q40/config.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,14 @@
3636
#include <asm/q40_master.h>
3737
#include <asm/config.h>
3838

39-
extern void q40_init_IRQ(void);
39+
#include "q40.h"
40+
4041
static void q40_get_model(char *model);
41-
extern void q40_sched_init(void);
4242

4343
static int q40_hwclk(int, struct rtc_time *);
4444
static int q40_get_rtc_pll(struct rtc_pll_info *pll);
4545
static int q40_set_rtc_pll(struct rtc_pll_info *pll);
4646

47-
extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/);
48-
4947
static void q40_mem_console_write(struct console *co, const char *b,
5048
unsigned int count);
5149

arch/m68k/q40/q40.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+
/* q40ints.c */
4+
void q40_init_IRQ(void);
5+
void q40_mksound(unsigned int hz, unsigned int ticks);
6+
void q40_sched_init(void);

arch/m68k/q40/q40ints.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <asm/q40_master.h>
2525
#include <asm/q40ints.h>
2626

27+
#include "q40.h"
28+
2729
/*
2830
* Q40 IRQs are defined as follows:
2931
* 3,4,5,6,7,10,11,14,15 : ISA dev IRQs

0 commit comments

Comments
 (0)