Skip to content

Commit

Permalink
kgdb,x86: remove redundant test
Browse files Browse the repository at this point in the history
The for loop starts with a breakno of 0, and ends when it's 4. so
this test is always true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
  • Loading branch information
Roel Kluin authored and Jason Wessel committed Dec 11, 2009
1 parent 3ef884b commit a5d09d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ static void kgdb_correct_hw_break(void)
dr7 |= ((breakinfo[breakno].len << 2) |
breakinfo[breakno].type) <<
((breakno << 2) + 16);
if (breakno >= 0 && breakno <= 3)
set_debugreg(breakinfo[breakno].addr, breakno);
set_debugreg(breakinfo[breakno].addr, breakno);

} else {
if ((dr7 & breakbit) && !breakinfo[breakno].enabled) {
Expand Down

0 comments on commit a5d09d6

Please sign in to comment.