MIPS: BMIPS: fix warnings for non BMIPS43xx builds
Subsystems (2)
PATCH 1/1 MIPS: BMIPS: fix warnings for non BMIPS43xx builds
Commit dccfb4c4 ("MIPS: BMIPS: support booting from physical CPU other than 0") introduces the following warning when building for non BMIPS43xx builds:
arch/mips/kernel/smp-bmips.c:150:6: error: unused variable 'tpid' [-Werror=unused-variable]
Fix this by getting rid of this variable and directly using cpu_logical_map(cpu).
---
Ralf,
You might want to fold this into the commit that actually introduced the build warning.
Thanks!
arch/mips/kernel/smp-bmips.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/mips/kernel/smp-bmips.c +1 -2
@@ -147,7 +147,6 @@ static void bmips_prepare_cpus(unsigned int max_cpus)*/ static void bmips_boot_secondary (int cpu,struct task_struct *idle) { -int tpid =cpu_logical_map (cpu); bmips_smp_boot_sp =__KSTK_TOS (idle); bmips_smp_boot_gp = (unsigned long )task_thread_info (idle);mb ();
@@ -174,7 +173,7 @@ static void bmips_boot_secondary(int cpu, struct task_struct *idle)else {#if defined(CONFIG_CPU_BMIPS4350 ) || defined(CONFIG_CPU_BMIPS4380 )/* Reset slave TP1 if booting from TP0 */ -if (tpid ==0 ) +if (cpu_logical_map (cpu) ==0 )set_c0_brcm_cmt_ctrl (0x01 );#elif defined(CONFIG_CPU_BMIPS5000 )if (cpu &0x01 )
Signature · 1 line
1.8.1.2
Quoted 9 lines · Florian Fainelli
Commit
dccfb4c4("MIPS: BMIPS: support booting from physical CPU other than 0") introduces the following warning when building for non BMIPS43xx builds:
arch/mips/kernel/smp-bmips.c:150:6: error: unused variable 'tpid' [-Werror=unused-variable]Fix this by getting rid of this variable and directly using
cpu_logical_map(cpu).
Sounds like the previous patch wasn't really tested - or somebody shot himself into the foot by removing the -Werror.
Anyway, folded in.
Ralf
2013/6/27 Ralf Baechle <[email protected]>:
Quoted 6 lines · Florian Fainelli
Quoted 5 lines
Commit
dccfb4c4("MIPS: BMIPS: support booting from physical CPU other than 0") introduces the following warning when building for non BMIPS43xx builds:
Quoted 8 lines
Quoted 5 lines
arch/mips/kernel/smp-bmips.c:150:6: error: unused variable 'tpid' [-Werror=unused-variable]Fix this by getting rid of this variable and directly using
cpu_logical_map(cpu).Sounds like the previous patch wasn't really tested - or somebody shot himself into the foot by removing the -Werror.
There is nothing in tree using BMIPS3300 or BMIPS5000 which are the only two other possibilities where this warning could have been caught.
Quoted 2 lines
Anyway, folded in.
Thanks
--
Florian