diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-01-06 15:52:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-06 15:52:41 -0500 |
commit | 0157141ae29d7a0998b9f040e577895980430d89 (patch) | |
tree | 8754a2981beca17575441b459aef718386364f8a | |
parent | ff9aefbf4dab2c631a90f0319dfb316c6769d5a4 (diff) |
sparc: refactor code in fault_32.c
The sparc allmodconfig build broke due to enabling of the
branch_tracer that does some very clever things with
all if conditions. This caused my gcc 3.4.5 to be so confused that
it emitted a warning:
arch/sparc/mm/fault_32.c: In function `do_sparc_fault':
arch/sparc/mm/fault_32.c:176: warning: 'fixup' might be used uninitialized in this function
And with -Werror this broke the build.
Refactor code so it:
1) becomes more readable
2) no longer emit a warning with the branch_tracer enabled
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/mm/fault_32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index a507e1174662..12e447fc8542 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c | |||
@@ -283,7 +283,8 @@ bad_area_nosemaphore: | |||
283 | /* Is this in ex_table? */ | 283 | /* Is this in ex_table? */ |
284 | no_context: | 284 | no_context: |
285 | g2 = regs->u_regs[UREG_G2]; | 285 | g2 = regs->u_regs[UREG_G2]; |
286 | if (!from_user && (fixup = search_extables_range(regs->pc, &g2))) { | 286 | if (!from_user) { |
287 | fixup = search_extables_range(regs->pc, &g2); | ||
287 | if (fixup > 10) { /* Values below are reserved for other things */ | 288 | if (fixup > 10) { /* Values below are reserved for other things */ |
288 | extern const unsigned __memset_start[]; | 289 | extern const unsigned __memset_start[]; |
289 | extern const unsigned __memset_end[]; | 290 | extern const unsigned __memset_end[]; |