All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Blackfin arch: Fix decoding of opcodes 41-47 in decode_instruction()
@ 2010-01-08 19:06 Roel Kluin
  2010-01-09  7:13 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2010-01-08 19:06 UTC (permalink / raw)
  To: Mike Frysinger, uclinux-dist-devel, Andrew Morton, LKML

This condition allowed only decoding of opcode 0x0040

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 arch/blackfin/kernel/traps.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Found with static code analysis. Correct?

diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index d3cbcd6..870d74b 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -712,7 +712,7 @@ static void decode_instruction(unsigned short *address)
 			verbose_printk("RTE");
 		else if (opcode == 0x0025)
 			verbose_printk("EMUEXCPT");
-		else if (opcode == 0x0040 && opcode <= 0x0047)
+		else if (opcode >= 0x0040 && opcode <= 0x0047)
 			verbose_printk("STI R%i", opcode & 7);
 		else if (opcode >= 0x0050 && opcode <= 0x0057)
 			verbose_printk("JUMP (P%i)", opcode & 7);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-09  7:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08 19:06 [PATCH] Blackfin arch: Fix decoding of opcodes 41-47 in decode_instruction() Roel Kluin
2010-01-09  7:13 ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.