Skip to content

Commit f134bd1

Browse files
committed
MIPS: sgi-ip27: Fix missing prototypes
Fix missing prototypes by making not shared functions static and adding others to ip27-common.h. Also drop ip27-hubio.c as it's not used for a long time. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
1 parent feab191 commit f134bd1

File tree

7 files changed

+17
-204
lines changed

7 files changed

+17
-204
lines changed

arch/mips/sgi-ip27/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
obj-y := ip27-berr.o ip27-irq.o ip27-init.o ip27-klconfig.o \
77
ip27-klnuma.o ip27-memory.o ip27-nmi.o ip27-reset.o ip27-timer.o \
8-
ip27-hubio.o ip27-xtalk.o
8+
ip27-xtalk.o
99

1010
obj-$(CONFIG_EARLY_PRINTK) += ip27-console.o
1111
obj-$(CONFIG_SMP) += ip27-smp.o

arch/mips/sgi-ip27/ip27-berr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include <asm/traps.h>
2323
#include <linux/uaccess.h>
2424

25+
#include "ip27-common.h"
26+
2527
static void dump_hub_information(unsigned long errst0, unsigned long errst1)
2628
{
2729
static char *err_type[2][8] = {
@@ -57,7 +59,7 @@ static void dump_hub_information(unsigned long errst0, unsigned long errst1)
5759
[st0.pi_stat0_fmt.s0_err_type] ? : "invalid");
5860
}
5961

60-
int ip27_be_handler(struct pt_regs *regs, int is_fixup)
62+
static int ip27_be_handler(struct pt_regs *regs, int is_fixup)
6163
{
6264
unsigned long errst0, errst1;
6365
int data = regs->cp0_cause & 4;

arch/mips/sgi-ip27/ip27-common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ extern void hub_rt_clock_event_init(void);
1010
extern void hub_rtc_init(nasid_t nasid);
1111
extern void install_cpu_nmi_handler(int slice);
1212
extern void install_ipi(void);
13+
extern void ip27_be_init(void);
1314
extern void ip27_reboot_setup(void);
1415
extern const struct plat_smp_ops ip27_smp_ops;
1516
extern unsigned long node_getfirstfree(nasid_t nasid);
1617
extern void per_cpu_init(void);
1718
extern void replicate_kernel_text(void);
1819
extern void setup_replication_mask(void);
1920

21+
2022
#endif /* __IP27_COMMON_H */

arch/mips/sgi-ip27/ip27-hubio.c

Lines changed: 0 additions & 185 deletions
This file was deleted.

arch/mips/sgi-ip27/ip27-irq.c

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

26+
#include "ip27-common.h"
27+
2628
struct hub_irq_data {
2729
u64 *irq_mask[2];
2830
cpuid_t cpu;

arch/mips/sgi-ip27/ip27-memory.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <asm/page.h>
2424
#include <asm/pgalloc.h>
2525
#include <asm/sections.h>
26+
#include <asm/sgialib.h>
2627

2728
#include <asm/sn/arch.h>
2829
#include <asm/sn/agent.h>

arch/mips/sgi-ip27/ip27-nmi.c

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include <asm/sn/arch.h>
1212
#include <asm/sn/agent.h>
1313

14+
#include "ip27-common.h"
15+
1416
#if 0
1517
#define NODE_NUM_CPUS(n) CNODE_NUM_CPUS(n)
1618
#else
@@ -23,16 +25,7 @@
2325
typedef unsigned long machreg_t;
2426

2527
static arch_spinlock_t nmi_lock = __ARCH_SPIN_LOCK_UNLOCKED;
26-
27-
/*
28-
* Let's see what else we need to do here. Set up sp, gp?
29-
*/
30-
void nmi_dump(void)
31-
{
32-
void cont_nmi_dump(void);
33-
34-
cont_nmi_dump();
35-
}
28+
static void nmi_dump(void);
3629

3730
void install_cpu_nmi_handler(int slice)
3831
{
@@ -53,7 +46,7 @@ void install_cpu_nmi_handler(int slice)
5346
* into the eframe format for the node under consideration.
5447
*/
5548

56-
void nmi_cpu_eframe_save(nasid_t nasid, int slice)
49+
static void nmi_cpu_eframe_save(nasid_t nasid, int slice)
5750
{
5851
struct reg_struct *nr;
5952
int i;
@@ -129,7 +122,7 @@ void nmi_cpu_eframe_save(nasid_t nasid, int slice)
129122
pr_emerg("\n");
130123
}
131124

132-
void nmi_dump_hub_irq(nasid_t nasid, int slice)
125+
static void nmi_dump_hub_irq(nasid_t nasid, int slice)
133126
{
134127
u64 mask0, mask1, pend0, pend1;
135128

@@ -153,7 +146,7 @@ void nmi_dump_hub_irq(nasid_t nasid, int slice)
153146
* Copy the cpu registers which have been saved in the IP27prom format
154147
* into the eframe format for the node under consideration.
155148
*/
156-
void nmi_node_eframe_save(nasid_t nasid)
149+
static void nmi_node_eframe_save(nasid_t nasid)
157150
{
158151
int slice;
159152

@@ -170,17 +163,15 @@ void nmi_node_eframe_save(nasid_t nasid)
170163
/*
171164
* Save the nmi cpu registers for all cpus in the system.
172165
*/
173-
void
174-
nmi_eframes_save(void)
166+
static void nmi_eframes_save(void)
175167
{
176168
nasid_t nasid;
177169

178170
for_each_online_node(nasid)
179171
nmi_node_eframe_save(nasid);
180172
}
181173

182-
void
183-
cont_nmi_dump(void)
174+
static void nmi_dump(void)
184175
{
185176
#ifndef REAL_NMI_SIGNAL
186177
static atomic_t nmied_cpus = ATOMIC_INIT(0);

0 commit comments

Comments
 (0)