: move unused variable to right ifdef branch
PATCH 1/1 : move unused variable to right ifdef branch
Hi
config1 was only usend inside the ifdef. Move definition there.
Once here, make things u32 instead of unsigned int.
Later, Juan.
build/arch/mips/mm/tlb-r4k.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
build/arch/mips/mm/tlb-r4k.c renamed from build/arch/mips/mm/tlb-r4k.c~move_unused_var_tlb-r4k.c +5 -4
@@ -333,9 +333,8 @@ out:static void __init probe_tlb (unsigned long config) { -unsigned int prid, config1; +u32 prid =read_c0_prid () &0xff00 ; - prid =read_c0_prid () &0xff00 ;if (prid ==PRID_IMP_RM7000 || !(config & (1 <<31 )))/* * Not a MIPS32 complianant CPU. Config 1 register not
@@ -345,11 +344,13 @@ static void __init probe_tlb(unsigned loreturn ;#if defined(CONFIG_CPU_MIPS32 ) || defined (CONFIG_CPU_MIPS64 ) - config1 =read_c0_config1 ();if (!((config >>7 ) &3 ))panic ("No MMU present" ); -else +else { +u32 config1 =read_c0_config1 (); + mips_cpu.tlbsize = ((config1 >>25 ) &0x3f ) +1 ; + }#endif }
_
Signature · 2 lines
In theory, practice and theory are the same, but in practice they are different -- Larry McVoy