Skip to content

Commit 55775fe

Browse files
committed
m68k: apollo: Make local reset, serial, and irq functions static
When building with W=1: arch/m68k/apollo/config.c:132:6: warning: no previous prototype for ‘dn_serial_print’ [-Wmissing-prototypes] 110 | void dn_serial_print (const char *str) | ^~~~~~~~~~~~~~~ arch/m68k/apollo/dn_ints.c:8:14: warning: no previous prototype for ‘apollo_irq_startup’ [-Wmissing-prototypes] 8 | unsigned int apollo_irq_startup(struct irq_data *data) | ^~~~~~~~~~~~~~~~~~ arch/m68k/apollo/dn_ints.c:19:6: warning: no previous prototype for ‘apollo_irq_shutdown’ [-Wmissing-prototypes] 19 | void apollo_irq_shutdown(struct irq_data *data) | ^~~~~~~~~~~~~~~~~~~ arch/m68k/apollo/dn_ints.c:29:6: warning: no previous prototype for ‘apollo_irq_eoi’ [-Wmissing-prototypes] 29 | void apollo_irq_eoi(struct irq_data *data) | ^~~~~~~~~~~~~~ Fix this by making all local functions static. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/d2b3a6785d3e80069fea85921c72cf0b7afb8493.1694613528.git.geert@linux-m68k.org
1 parent 93c12e3 commit 55775fe

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

arch/m68k/apollo/config.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ u_long apollo_model;
2929
extern void dn_sched_init(void);
3030
extern void dn_init_IRQ(void);
3131
extern int dn_dummy_hwclk(int, struct rtc_time *);
32-
extern void dn_dummy_reset(void);
32+
static void dn_dummy_reset(void);
3333
#ifdef CONFIG_HEARTBEAT
3434
static void dn_heartbeat(int on);
3535
#endif
@@ -107,7 +107,7 @@ static void __init dn_setup_model(void)
107107

108108
}
109109

110-
void dn_serial_print (const char *str)
110+
static void dn_serial_print(const char *str)
111111
{
112112
while (*str) {
113113
if (*str == '\n') {
@@ -207,8 +207,8 @@ int dn_dummy_hwclk(int op, struct rtc_time *t) {
207207

208208
}
209209

210-
void dn_dummy_reset(void) {
211-
210+
static void dn_dummy_reset(void)
211+
{
212212
dn_serial_print("The end !\n");
213213

214214
for(;;);

arch/m68k/apollo/dn_ints.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <asm/traps.h>
66
#include <asm/apollohw.h>
77

8-
unsigned int apollo_irq_startup(struct irq_data *data)
8+
static unsigned int apollo_irq_startup(struct irq_data *data)
99
{
1010
unsigned int irq = data->irq;
1111

@@ -16,7 +16,7 @@ unsigned int apollo_irq_startup(struct irq_data *data)
1616
return 0;
1717
}
1818

19-
void apollo_irq_shutdown(struct irq_data *data)
19+
static void apollo_irq_shutdown(struct irq_data *data)
2020
{
2121
unsigned int irq = data->irq;
2222

@@ -26,7 +26,7 @@ void apollo_irq_shutdown(struct irq_data *data)
2626
*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
2727
}
2828

29-
void apollo_irq_eoi(struct irq_data *data)
29+
static void apollo_irq_eoi(struct irq_data *data)
3030
{
3131
*(volatile unsigned char *)(pica) = 0x20;
3232
*(volatile unsigned char *)(picb) = 0x20;

0 commit comments

Comments
 (0)