aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2008-11-28 06:48:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-30 14:21:18 -0500
commit499c59c42967329d39481314a839d7669f5e1506 (patch)
treeedc8efaca3d5c7d927e89a27a7a4b54cea7afcf5 /arch/mn10300
parentf1ba3bc7b97ad0cc5886e5dadf4defba68f37819 (diff)
MN10300: Tighten up the code using case ranges
Compress a set of consecutive switch cases into a case-range. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300')
-rw-r--r--arch/mn10300/kernel/gdb-stub.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch/mn10300/kernel/gdb-stub.c
index 54be6afb5555..0ea7482c1522 100644
--- a/arch/mn10300/kernel/gdb-stub.c
+++ b/arch/mn10300/kernel/gdb-stub.c
@@ -522,17 +522,7 @@ static int gdbstub_single_step(struct pt_regs *regs)
522 } else { 522 } else {
523 switch (cur) { 523 switch (cur) {
524 /* Bxx (d8,PC) */ 524 /* Bxx (d8,PC) */
525 case 0xc0: 525 case 0xc0 ... 0xca:
526 case 0xc1:
527 case 0xc2:
528 case 0xc3:
529 case 0xc4:
530 case 0xc5:
531 case 0xc6:
532 case 0xc7:
533 case 0xc8:
534 case 0xc9:
535 case 0xca:
536 if (gdbstub_read_byte(pc + 1, (u8 *) &x) < 0) 526 if (gdbstub_read_byte(pc + 1, (u8 *) &x) < 0)
537 goto fault; 527 goto fault;
538 if (!__gdbstub_mark_bp(pc + 2, 0)) 528 if (!__gdbstub_mark_bp(pc + 2, 0))
@@ -543,17 +533,7 @@ static int gdbstub_single_step(struct pt_regs *regs)
543 break; 533 break;
544 534
545 /* LXX (d8,PC) */ 535 /* LXX (d8,PC) */
546 case 0xd0: 536 case 0xd0 ... 0xda:
547 case 0xd1:
548 case 0xd2:
549 case 0xd3:
550 case 0xd4:
551 case 0xd5:
552 case 0xd6:
553 case 0xd7:
554 case 0xd8:
555 case 0xd9:
556 case 0xda:
557 if (!__gdbstub_mark_bp(pc + 1, 0)) 537 if (!__gdbstub_mark_bp(pc + 1, 0))
558 goto fault; 538 goto fault;
559 if (regs->pc != regs->lar && 539 if (regs->pc != regs->lar &&