sparc32: fix sparse warnings in leon_smp.c
PATCH 24/24 sparc32: fix sparse warnings in leon_smp.c
Fix following warnings:
leon_smp.c:133:6: warning: symbol 'leon_smp_setbroadcast' was not declared. Should it be static? leon_smp.c:151:14: warning: symbol 'leon_smp_getbroadcast' was not declared. Should it be static? leon_smp.c:269:6: warning: symbol 'leon_irq_rotate' was not declared. Should it be static? leon_smp.c:355:6: warning: symbol 'leonsmp_ipi_interrupt' was not declared. Should it be static? leon_smp.c:457:6: warning: symbol 'leon_cross_call_irq' was not declared. Should it be static?
Add static.
Remove unused functions.
--- arch/sparc/kernel/kernel.h | 6 ++++-- arch/sparc/kernel/leon_smp.c | 13 +------------ 2 files changed, 5 insertions(+), 14 deletions(-)
arch/sparc/kernel/kernel.h +4 -2
@@ -79,8 +79,10 @@ extern void smp4d_cross_call_irq(void);extern void smp4d_percpu_timer_interrupt (struct pt_regs *regs);/* leon_smp.c */ -void leon_cpu_pre_starting (void *arg); -void leon_cpu_pre_online (void *arg); +extern void leon_cpu_pre_starting (void *arg); +extern void leon_cpu_pre_online (void *arg); +extern void leonsmp_ipi_interrupt (void ); +extern void leon_cross_call_irq (void );/* head_32.S */ extern unsigned int t_nmi[];
arch/sparc/kernel/leon_smp.c +1 -8
@@ -130,7 +130,7 @@ void leon_configure_cache_smp(void) local_ops->tlb_all (); } -void leon_smp_setbroadcast (unsigned int mask) +static void leon_smp_setbroadcast (unsigned int mask) { int broadcast ((LEON3_BYPASS_LOAD_PA(&(leon3_irqctrl_regs->mpstatus)) >>
@@ -148,13 +148,6 @@ void leon_smp_setbroadcast(unsigned int mask)LEON_BYPASS_STORE_PA (&(leon3_irqctrl_regs->mpbroadcast), mask); } -unsigned int leon_smp_getbroadcast (void ) -{ -unsigned int mask; - mask =LEON_BYPASS_LOAD_PA (&(leon3_irqctrl_regs->mpbroadcast)); -return mask; -} -int leon_smp_nrcpus (void ) { int nrcpu @@ -266,10 +259,6 @@ void __init leon_smp_done(void)
}
-void leon_irq_rotate(int cpu)
-{
-}
-
struct leon_ipi_work {
int single;
int msk;
Signature · 1 line
1.8.3.1
David Miller
maintainerFrom: Sam Ravnborg <[email protected]>
Date: Mon, 21 Apr 2014 19:12:36 +0200
arch/sparc/kernel/kernel.h extern void smp4d_cross_call_irq(void); · line 85
Quoted 6 lines
arch/sparc/kernel/kernel.h +4
-2-void leon_cpu_pre_starting (void *arg); -void leon_cpu_pre_online (void *arg); +extern void leon_cpu_pre_starting (void *arg); +extern void leon_cpu_pre_online (void *arg); +extern void leonsmp_ipi_interrupt (void ); +extern void leon_cross_call_irq (void );
For header files, we are moving away from specifying extern for external function declarations.
In the networking, we've made this transformation in all of our headers already, for example.
So if anything, you should be changing things to other way around.
Quoted 13 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Mon, 21 Apr 2014 19:12:36 +0200arch/sparc/kernel/kernel.h extern void smp4d_cross_call_irq(void); · line 85
Quoted 6 lines
arch/sparc/kernel/kernel.h +4
-2-void leon_cpu_pre_starting (void *arg); -void leon_cpu_pre_online (void *arg); +extern void leon_cpu_pre_starting (void *arg); +extern void leon_cpu_pre_online (void *arg); +extern void leonsmp_ipi_interrupt (void ); +extern void leon_cross_call_irq (void );For header files, we are moving away from specifying extern for external function declarations.
Quoted 2 lines
In the networking, we've made this transformation in all of our headers already, for example.
I have missed that.
Quoted 2 lines
So if anything, you should be changing things to other way around.
I prefer to send follow-up patches that fixes this for all of sparc, but I can also redo the serie if you prefer.
You will still have follow-up patches to fix the existing extern-for-prototypes users.
Sam
David Miller
maintainerFrom: Sam Ravnborg <[email protected]>
Date: Mon, 21 Apr 2014 19:56:10 +0200
Quoted 16 lines · David Miller
Quoted 13 lines
From: Sam Ravnborg <[email protected]>
Date: Mon, 21 Apr 2014 19:12:36 +0200arch/sparc/kernel/kernel.h extern void smp4d_cross_call_irq(void); · line 85
Quoted 6 lines
arch/sparc/kernel/kernel.h +4
-2-void leon_cpu_pre_starting (void *arg); -void leon_cpu_pre_online (void *arg); +extern void leon_cpu_pre_starting (void *arg); +extern void leon_cpu_pre_online (void *arg); +extern void leonsmp_ipi_interrupt (void ); +extern void leon_cross_call_irq (void );For header files, we are moving away from specifying extern for external function declarations.
Quoted 2 lines
In the networking, we've made this transformation in all of our headers already, for example.
Quoted 8 lines
I have missed that.
Quoted 2 lines
So if anything, you should be changing things to other way around.
I prefer to send follow-up patches that fixes this for all of sparc, but I can also redo the serie if you prefer.
You will still have follow-up patches to fix the existing extern-for-prototypes users.
I would be fine if you just removed the extern adding parts in this patch series and resubmitted.
Doing the arch/sparc wide extern removal could certainly be a future set of changes, and don't have to be done now.