qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 16/26] s390: use exit(EXIT_SUCCESS) and exit(EXIT_FA


From: Laurent Vivier
Subject: [Qemu-devel] [PATCH 16/26] s390: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE)
Date: Fri, 16 Sep 2016 15:56:07 +0200

This patch is the result of coccinelle script
scripts/coccinelle/exit.cocci

Signed-off-by: Laurent Vivier <address@hidden>
CC: Cornelia Huck <address@hidden>
---
 target-s390x/cpu.c        |  2 +-
 target-s390x/kvm.c        | 18 +++++++++---------
 target-s390x/mmu_helper.c |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 2f3c8e2..d4ca6af 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -385,7 +385,7 @@ unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU 
*cpu)
     default:
         error_report("Requested CPU state is not a valid S390 CPU state: %u",
                      cpu_state);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
     if (kvm_enabled() && cpu->env.cpu_state != cpu_state) {
         kvm_s390_set_cpu_state(cpu, cpu_state);
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index dfaf1ca..2b1b908 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -920,13 +920,13 @@ static void inject_vcpu_irq_legacy(CPUState *cs, struct 
kvm_s390_irq *irq)
     r = s390_kvm_irq_to_interrupt(irq, &kvmint);
     if (r < 0) {
         fprintf(stderr, "%s called with bogus interrupt\n", __func__);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     r = kvm_vcpu_ioctl(cs, KVM_S390_INTERRUPT, &kvmint);
     if (r < 0) {
         fprintf(stderr, "KVM failed to inject interrupt\n");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 }
 
@@ -941,7 +941,7 @@ void kvm_s390_vcpu_interrupt(S390CPU *cpu, struct 
kvm_s390_irq *irq)
             return;
         }
         error_report("KVM failed to inject interrupt %llx", irq->type);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     inject_vcpu_irq_legacy(cs, irq);
@@ -955,13 +955,13 @@ static void __kvm_s390_floating_interrupt(struct 
kvm_s390_irq *irq)
     r = s390_kvm_irq_to_interrupt(irq, &kvmint);
     if (r < 0) {
         fprintf(stderr, "%s called with bogus interrupt\n", __func__);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     r = kvm_vm_ioctl(kvm_state, KVM_S390_INTERRUPT, &kvmint);
     if (r < 0) {
         fprintf(stderr, "KVM failed to inject interrupt\n");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 }
 
@@ -1905,15 +1905,15 @@ static int handle_intercept(S390CPU *cpu)
             break;
         case ICPT_SOFT_INTERCEPT:
             fprintf(stderr, "KVM unimplemented icpt SOFT\n");
-            exit(1);
+            exit(EXIT_FAILURE);
             break;
         case ICPT_IO:
             fprintf(stderr, "KVM unimplemented icpt IO\n");
-            exit(1);
+            exit(EXIT_FAILURE);
             break;
         default:
             fprintf(stderr, "Unknown intercept code: %d\n", icpt_code);
-            exit(1);
+            exit(EXIT_FAILURE);
             break;
     }
 
@@ -2222,7 +2222,7 @@ int kvm_s390_set_cpu_state(S390CPU *cpu, uint8_t 
cpu_state)
     default:
         error_report("Requested CPU state is not a valid S390 CPU state: %u",
                      cpu_state);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     ret = kvm_vcpu_ioctl(CPU(cpu), KVM_SET_MP_STATE, &mp_state);
diff --git a/target-s390x/mmu_helper.c b/target-s390x/mmu_helper.c
index b11a027..dc9960a 100644
--- a/target-s390x/mmu_helper.c
+++ b/target-s390x/mmu_helper.c
@@ -414,7 +414,7 @@ static bool lowprot_enabled(const CPUS390XState *env)
     default:
         /* We don't support access register mode */
         error_report("unsupported addressing mode");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 }
 
-- 
2.5.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]