Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@mandrakesoft.com>
To: Ralf Baechle <ralf@linux-mips.org>, mipslist <linux-mips@linux-mips.org>
Subject: [PATCH]: move unused variable to right ifdef branch
Date: Thu, 27 Mar 2003 03:53:20 +0100	[thread overview]
Message-ID: <m2fzp9ed0f.fsf@mandrakesoft.com> (raw)


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(-)

diff -puN build/arch/mips/mm/tlb-r4k.c~move_unused_var_tlb-r4k.c build/arch/mips/mm/tlb-r4k.c
--- 24/build/arch/mips/mm/tlb-r4k.c~move_unused_var_tlb-r4k.c	2003-03-21 02:03:48.000000000 +0100
+++ 24-quintela/build/arch/mips/mm/tlb-r4k.c	2003-03-21 02:05:07.000000000 +0100
@@ -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 lo
 		return;
 
 #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
 }
 

_


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

                 reply	other threads:[~2003-03-27  2:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2fzp9ed0f.fsf@mandrakesoft.com \
    --to=quintela@mandrakesoft.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox