Skip to contentSkip to conversation

powerpc: fix emulate_step std test

PATCH Applied Nicholas Piggin 3 participants 3 messages Feb 26, 2020 – Mar 17, 2020 PowerPC

lore
Share & tools
lore

Nicholas Piggin

author reviewer
#0 lore raw

PATCH 1/1 powerpc: fix emulate_step std test

---
 arch/powerpc/lib/test_emulate_step.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/lib/test_emulate_step.c +1 -1
index 42347067739c..00d70253cb5b 100644
@@ -160,7 +160,7 @@ static void __init test_std(void)
 
 	/* std r5, 0(r3) */
 	stepped = emulate_step(&regs, TEST_STD(5, 3, 0));
-	if (stepped == 1 || regs.gpr[5] == a)
+	if (stepped == 1 && regs.gpr[5] == a)
 		show_result("std", "PASS");
 	else
 		show_result("std", "FAIL");
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Nicholas Piggin
Quoted 18 lines
---
  arch/powerpc/lib/test_emulate_step.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/lib/test_emulate_step.c +1 -1
index 42347067739c..00d70253cb5b 100644
@@ -160,7 +160,7 @@ static void __init test_std(void)
 
  	/* std r5, 0(r3) */
  	stepped = emulate_step(&regs, TEST_STD(5, 3, 0));
-	if (stepped == 1 || regs.gpr[5] == a)
+	if (stepped == 1 && regs.gpr[5] == a)
  		show_result("std", "PASS");
  	else
  		show_result("std", "FAIL");