[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
- [Qemu-devel] [PATCH 17/26] tcg: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), (continued)
- [Qemu-devel] [PATCH 17/26] tcg: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 15/26] mips: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 21/26] misc machine: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 12/26] sparc: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 06/26] graphics: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 11/26] pci, virtio: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 08/26] replay: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 26/26] net: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 20/26] common: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 22/26] blockdev: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 16/26] s390: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE),
Laurent Vivier <=
- [Qemu-devel] [PATCH 23/26] core: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- Re: [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), no-reply, 2016/09/16
- Re: [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Peter Maydell, 2016/09/16