linux-mips
[Top] [All Lists]

[PATCH] MIPS: BMIPS: fix warnings for non BMIPS43xx builds

To: linux-mips@linux-mips.org
Subject: [PATCH] MIPS: BMIPS: fix warnings for non BMIPS43xx builds
From: "Florian Fainelli" <florian@openwrt.org>
Date: Thu, 27 Jun 2013 11:45:15 +0100
Cc: ralf@linux-mips.org, blogic@openwrt.org, jogo@openwrt.org, cernekee@gmail.com, "Florian Fainelli" <florian@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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).

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
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(-)

diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index 62c5c7c..aea6c08 100644
--- a/arch/mips/kernel/smp-bmips.c
+++ b/arch/mips/kernel/smp-bmips.c
@@ -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)
-- 
1.8.1.2



<Prev in Thread] Current Thread [Next in Thread>