Patchwork [7/7] s390x/kvm: Remove redundant return code

login
register
mail settings
Submitter Christian Borntraeger
Date July 15, 2013, 7:57 p.m.
Message ID <1373918265-20172-8-git-send-email-borntraeger@de.ibm.com>
Download mbox | patch
Permalink /patch/259256/
State New
Headers show

Comments

Christian Borntraeger - July 15, 2013, 7:57 p.m.
From: Thomas Huth <thuth@linux.vnet.ibm.com>

Removed the redundant return code statement from handle_instruction() - it
always returned 0 and never reports any errors to its caller, since errors
from the sub-functions are already reported via program exceptions instead.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: CHristian Borntraeger <borntraeger@de.ibm.com>
---
 target-s390x/kvm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 1b123cf..3dfd19c 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -697,7 +697,7 @@  out:
     return 0;
 }
 
-static int handle_instruction(S390CPU *cpu, struct kvm_run *run)
+static void handle_instruction(S390CPU *cpu, struct kvm_run *run)
 {
     unsigned int ipa0 = (run->s390_sieic.ipa & 0xff00);
     uint8_t ipa1 = run->s390_sieic.ipa & 0x00ff;
@@ -722,7 +722,6 @@  static int handle_instruction(S390CPU *cpu, struct kvm_run *run)
     if (r < 0) {
         enter_pgmcheck(cpu, 0x0001);
     }
-    return 0;
 }
 
 static bool is_special_wait_psw(CPUState *cs)
@@ -742,7 +741,7 @@  static int handle_intercept(S390CPU *cpu)
             (long)cs->kvm_run->psw_addr);
     switch (icpt_code) {
         case ICPT_INSTRUCTION:
-            r = handle_instruction(cpu, run);
+            handle_instruction(cpu, run);
             break;
         case ICPT_WAITPSW:
             /* disabled wait, since enabled wait is handled in kernel */