[U-Boot] [PATCH 08/32] arch/powerpc/lib/board.c, *traps.c: sparse fixes
Kim Phillips
kim.phillips at freescale.com
Wed Oct 17 02:28:24 CEST 2012
traps.c:*:1: warning: symbol 'print_backtrace' was not declared. Should it be static?
traps.c:66:6: warning: symbol 'show_regs' was not declared. Should it be static?
traps.c:93:1: warning: symbol '_exception' was not declared. Should it be static?
board.c:166:6: warning: symbol '__board_add_ram_info' was not declared. Should it be static?
board.c:174:5: warning: symbol '__board_flash_wp_on' was not declared. Should it be static?
board.c:187:6: warning: symbol '__cpu_secondary_init_r' was not declared. Should it be static?
board.c:265:12: warning: symbol 'init_sequence' was not declared. Should it be static?
board.c:348:5: warning: symbol '__fixup_cpu' was not declared. Should it be static?
board.c:405:53: warning: Using plain integer as NULL pointer
Signed-off-by: Kim Phillips <kim.phillips at freescale.com>
---
arch/powerpc/cpu/74xx_7xx/traps.c | 6 +++---
arch/powerpc/cpu/mpc512x/traps.c | 6 +++---
arch/powerpc/cpu/mpc5xx/traps.c | 6 +++---
arch/powerpc/cpu/mpc5xxx/traps.c | 6 +++---
arch/powerpc/cpu/mpc8220/traps.c | 6 +++---
arch/powerpc/cpu/mpc824x/traps.c | 6 +++---
arch/powerpc/cpu/mpc8260/traps.c | 6 +++---
arch/powerpc/cpu/mpc83xx/traps.c | 6 +++---
arch/powerpc/cpu/mpc85xx/traps.c | 6 +++---
arch/powerpc/cpu/mpc86xx/traps.c | 6 +++---
arch/powerpc/cpu/mpc8xx/traps.c | 6 +++---
arch/powerpc/cpu/ppc4xx/traps.c | 6 +++---
arch/powerpc/lib/board.c | 12 ++++++------
13 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/arch/powerpc/cpu/74xx_7xx/traps.c b/arch/powerpc/cpu/74xx_7xx/traps.c
index 7ae81eb..4f77202 100644
--- a/arch/powerpc/cpu/74xx_7xx/traps.c
+++ b/arch/powerpc/cpu/74xx_7xx/traps.c
@@ -48,7 +48,7 @@ extern unsigned long search_exception_table(unsigned long);
* Trap & Exception support
*/
-void
+static void
print_backtrace(unsigned long *sp)
{
int cnt = 0;
@@ -69,7 +69,7 @@ print_backtrace(unsigned long *sp)
printf("\n");
}
-void
+static void
show_regs(struct pt_regs * regs)
{
int i;
@@ -100,7 +100,7 @@ show_regs(struct pt_regs * regs)
}
-void
+static void
_exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
diff --git a/arch/powerpc/cpu/mpc512x/traps.c b/arch/powerpc/cpu/mpc512x/traps.c
index 786f4a5..3b84d57 100644
--- a/arch/powerpc/cpu/mpc512x/traps.c
+++ b/arch/powerpc/cpu/mpc512x/traps.c
@@ -47,7 +47,7 @@ extern ulong get_effective_memsize(void);
* Trap & Exception support
*/
-void
+static void
print_backtrace (unsigned long *sp)
{
int cnt = 0;
@@ -68,7 +68,7 @@ print_backtrace (unsigned long *sp)
putc ('\n');
}
-void show_regs (struct pt_regs * regs)
+static void show_regs (struct pt_regs * regs)
{
int i;
@@ -94,7 +94,7 @@ void show_regs (struct pt_regs * regs)
}
-void
+static void
_exception (int signr, struct pt_regs *regs)
{
show_regs (regs);
diff --git a/arch/powerpc/cpu/mpc5xx/traps.c b/arch/powerpc/cpu/mpc5xx/traps.c
index e3ce11b..4950b65 100644
--- a/arch/powerpc/cpu/mpc5xx/traps.c
+++ b/arch/powerpc/cpu/mpc5xx/traps.c
@@ -52,7 +52,7 @@ extern unsigned long search_exception_table(unsigned long);
/*
* Print stack backtrace
*/
-void print_backtrace(unsigned long *sp)
+static void print_backtrace(unsigned long *sp)
{
int cnt = 0;
unsigned long i;
@@ -75,7 +75,7 @@ void print_backtrace(unsigned long *sp)
/*
* Print current registers
*/
-void show_regs(struct pt_regs * regs)
+static void show_regs(struct pt_regs * regs)
{
int i;
printf("NIP: %08lX XER: %08lX LR: %08lX REGS: %p TRAP: %04lx DAR: %08lX\n",
@@ -105,7 +105,7 @@ void show_regs(struct pt_regs * regs)
/*
* General exception handler routine
*/
-void _exception(int signr, struct pt_regs *regs)
+static void _exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
print_backtrace((unsigned long *)regs->gpr[1]);
diff --git a/arch/powerpc/cpu/mpc5xxx/traps.c b/arch/powerpc/cpu/mpc5xxx/traps.c
index 5972f34..c4d4c0b 100644
--- a/arch/powerpc/cpu/mpc5xxx/traps.c
+++ b/arch/powerpc/cpu/mpc5xxx/traps.c
@@ -49,7 +49,7 @@ extern unsigned long search_exception_table(unsigned long);
* Trap & Exception support
*/
-void
+static void
print_backtrace(unsigned long *sp)
{
int cnt = 0;
@@ -70,7 +70,7 @@ print_backtrace(unsigned long *sp)
printf("\n");
}
-void show_regs(struct pt_regs * regs)
+static void show_regs(struct pt_regs * regs)
{
int i;
@@ -98,7 +98,7 @@ void show_regs(struct pt_regs * regs)
}
-void
+static void
_exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
diff --git a/arch/powerpc/cpu/mpc8220/traps.c b/arch/powerpc/cpu/mpc8220/traps.c
index 13894c9..d8786c2 100644
--- a/arch/powerpc/cpu/mpc8220/traps.c
+++ b/arch/powerpc/cpu/mpc8220/traps.c
@@ -49,7 +49,7 @@ extern unsigned long search_exception_table (unsigned long);
* Trap & Exception support
*/
-void print_backtrace (unsigned long *sp)
+static void print_backtrace (unsigned long *sp)
{
int cnt = 0;
unsigned long i;
@@ -70,7 +70,7 @@ void print_backtrace (unsigned long *sp)
printf ("\n");
}
-void show_regs (struct pt_regs *regs)
+static void show_regs (struct pt_regs *regs)
{
int i;
@@ -96,7 +96,7 @@ void show_regs (struct pt_regs *regs)
}
-void _exception (int signr, struct pt_regs *regs)
+static void _exception (int signr, struct pt_regs *regs)
{
show_regs (regs);
print_backtrace ((unsigned long *) regs->gpr[1]);
diff --git a/arch/powerpc/cpu/mpc824x/traps.c b/arch/powerpc/cpu/mpc824x/traps.c
index 163b983..63ab9b9 100644
--- a/arch/powerpc/cpu/mpc824x/traps.c
+++ b/arch/powerpc/cpu/mpc824x/traps.c
@@ -46,7 +46,7 @@ extern unsigned long search_exception_table(unsigned long);
* Trap & Exception support
*/
-void
+static void
print_backtrace(unsigned long *sp)
{
int cnt = 0;
@@ -67,7 +67,7 @@ print_backtrace(unsigned long *sp)
printf("\n");
}
-void show_regs(struct pt_regs * regs)
+static void show_regs(struct pt_regs * regs)
{
int i;
@@ -95,7 +95,7 @@ void show_regs(struct pt_regs * regs)
}
-void
+static void
_exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
diff --git a/arch/powerpc/cpu/mpc8260/traps.c b/arch/powerpc/cpu/mpc8260/traps.c
index c116cdf..02e287b 100644
--- a/arch/powerpc/cpu/mpc8260/traps.c
+++ b/arch/powerpc/cpu/mpc8260/traps.c
@@ -49,7 +49,7 @@ extern unsigned long search_exception_table(unsigned long);
* Trap & Exception support
*/
-void
+static void
print_backtrace(unsigned long *sp)
{
int cnt = 0;
@@ -70,7 +70,7 @@ print_backtrace(unsigned long *sp)
putc ('\n');
}
-void show_regs(struct pt_regs * regs)
+static void show_regs(struct pt_regs * regs)
{
int i;
@@ -96,7 +96,7 @@ void show_regs(struct pt_regs * regs)
}
-void
+static void
_exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
diff --git a/arch/powerpc/cpu/mpc83xx/traps.c b/arch/powerpc/cpu/mpc83xx/traps.c
index 9d71b8b..5cefa09 100644
--- a/arch/powerpc/cpu/mpc83xx/traps.c
+++ b/arch/powerpc/cpu/mpc83xx/traps.c
@@ -42,7 +42,7 @@ extern unsigned long search_exception_table(unsigned long);
* Trap & Exception support
*/
-void
+static void
print_backtrace(unsigned long *sp)
{
int cnt = 0;
@@ -63,7 +63,7 @@ print_backtrace(unsigned long *sp)
putc ('\n');
}
-void show_regs(struct pt_regs * regs)
+static void show_regs(struct pt_regs * regs)
{
int i;
@@ -89,7 +89,7 @@ void show_regs(struct pt_regs * regs)
}
-void
+static void
_exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c
index 7800717..e4bb6af 100644
--- a/arch/powerpc/cpu/mpc85xx/traps.c
+++ b/arch/powerpc/cpu/mpc85xx/traps.c
@@ -82,7 +82,7 @@ extern void do_bedbug_breakpoint(struct pt_regs *);
* Trap & Exception support
*/
-void
+static void
print_backtrace(unsigned long *sp)
{
int cnt = 0;
@@ -103,7 +103,7 @@ print_backtrace(unsigned long *sp)
printf("\n");
}
-void show_regs(struct pt_regs * regs)
+static void show_regs(struct pt_regs * regs)
{
int i;
@@ -131,7 +131,7 @@ void show_regs(struct pt_regs * regs)
}
-void
+static void
_exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
diff --git a/arch/powerpc/cpu/mpc86xx/traps.c b/arch/powerpc/cpu/mpc86xx/traps.c
index 406403e..83db97c 100644
--- a/arch/powerpc/cpu/mpc86xx/traps.c
+++ b/arch/powerpc/cpu/mpc86xx/traps.c
@@ -52,7 +52,7 @@ extern ulong get_effective_memsize(void);
* Trap & Exception support
*/
-void
+static void
print_backtrace(unsigned long *sp)
{
int cnt = 0;
@@ -74,7 +74,7 @@ print_backtrace(unsigned long *sp)
printf("\n");
}
-void
+static void
show_regs(struct pt_regs *regs)
{
int i;
@@ -103,7 +103,7 @@ show_regs(struct pt_regs *regs)
}
-void
+static void
_exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
diff --git a/arch/powerpc/cpu/mpc8xx/traps.c b/arch/powerpc/cpu/mpc8xx/traps.c
index 343dced..3bc2312 100644
--- a/arch/powerpc/cpu/mpc8xx/traps.c
+++ b/arch/powerpc/cpu/mpc8xx/traps.c
@@ -52,7 +52,7 @@ extern unsigned long search_exception_table(unsigned long);
* Trap & Exception support
*/
-void
+static void
print_backtrace(unsigned long *sp)
{
int cnt = 0;
@@ -73,7 +73,7 @@ print_backtrace(unsigned long *sp)
printf("\n");
}
-void show_regs(struct pt_regs * regs)
+static void show_regs(struct pt_regs * regs)
{
int i;
@@ -101,7 +101,7 @@ void show_regs(struct pt_regs * regs)
}
-void
+static void
_exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
diff --git a/arch/powerpc/cpu/ppc4xx/traps.c b/arch/powerpc/cpu/ppc4xx/traps.c
index 9baa7a1..1ed8387 100644
--- a/arch/powerpc/cpu/ppc4xx/traps.c
+++ b/arch/powerpc/cpu/ppc4xx/traps.c
@@ -74,7 +74,7 @@ extern void do_bedbug_breakpoint(struct pt_regs *);
* Trap & Exception support
*/
-void
+static void
print_backtrace(unsigned long *sp)
{
int cnt = 0;
@@ -95,7 +95,7 @@ print_backtrace(unsigned long *sp)
printf("\n");
}
-void show_regs(struct pt_regs * regs)
+static void show_regs(struct pt_regs * regs)
{
int i;
@@ -121,7 +121,7 @@ void show_regs(struct pt_regs * regs)
}
-void
+static void
_exception(int signr, struct pt_regs *regs)
{
show_regs(regs);
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index b860141..42bbff7 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -163,7 +163,7 @@ static int init_baudrate(void)
/***********************************************************************/
-void __board_add_ram_info(int use_default)
+static void __board_add_ram_info(int use_default)
{
/* please define platform specific board_add_ram_info() */
}
@@ -171,7 +171,7 @@ void __board_add_ram_info(int use_default)
void board_add_ram_info(int)
__attribute__ ((weak, alias("__board_add_ram_info")));
-int __board_flash_wp_on(void)
+static int __board_flash_wp_on(void)
{
/*
* Most flashes can't be detected when write protection is enabled,
@@ -184,7 +184,7 @@ int __board_flash_wp_on(void)
int board_flash_wp_on(void)
__attribute__ ((weak, alias("__board_flash_wp_on")));
-void __cpu_secondary_init_r(void)
+static void __cpu_secondary_init_r(void)
{
}
@@ -262,7 +262,7 @@ static int init_func_watchdog_reset(void)
* Initialization sequence
*/
-init_fnc_t *init_sequence[] = {
+static init_fnc_t *init_sequence[] = {
#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
probecpu,
#endif
@@ -345,7 +345,7 @@ ulong get_effective_memsize(void)
#endif
}
-int __fixup_cpu(void)
+static int __fixup_cpu(void)
{
return 0;
}
@@ -402,7 +402,7 @@ void board_init_f(ulong bootflag)
#ifdef CONFIG_POST
post_bootmode_init();
- post_run(NULL, POST_ROM | post_bootmode_get(0));
+ post_run(NULL, POST_ROM | post_bootmode_get(NULL));
#endif
WATCHDOG_RESET();
--
1.7.12.3
More information about the U-Boot
mailing list