arch/powerpc/cpu/mpc85xx/cpu_init.c: Fix GCC 4.6 build warning
authorKumar Gala <galak@kernel.crashing.org>
Wed, 9 Nov 2011 15:56:41 +0000 (09:56 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 11 Nov 2011 13:48:59 +0000 (07:48 -0600)
Fix:

cpu_init.c: In function 'cpu_init_r':
cpu_init.c:320:7: warning: variable 'l2srbar' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/cpu/mpc85xx/cpu_init.c

index 0a4ce538f3b3494bd262af16234d30fec21ca0f3..b9a8193759772cbe0a8c4a2caafb473e1a46f5a0 100644 (file)
@@ -317,7 +317,6 @@ int cpu_init_r(void)
        volatile ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
        volatile uint cache_ctl;
        uint svr, ver;
-       uint l2srbar;
        u32 l2siz_field;
 
        svr = get_svr();
@@ -385,8 +384,8 @@ int cpu_init_r(void)
 
        if (l2cache->l2ctl & MPC85xx_L2CTL_L2E) {
                puts("already enabled");
-               l2srbar = l2cache->l2srbar0;
 #if defined(CONFIG_SYS_INIT_L2_ADDR) && defined(CONFIG_SYS_FLASH_BASE)
+               u32 l2srbar = l2cache->l2srbar0;
                if (l2cache->l2ctl & MPC85xx_L2CTL_L2SRAM_ENTIRE
                                && l2srbar >= CONFIG_SYS_FLASH_BASE) {
                        l2srbar = CONFIG_SYS_INIT_L2_ADDR;