[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 38/59] s390x/sclp.c: remove unneeded label in sclp_service_cal
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v1 38/59] s390x/sclp.c: remove unneeded label in sclp_service_call() |
Date: |
Mon, 6 Jan 2020 15:24:04 -0300 |
'out' label can be replaced by 'return' with the appropriate
value. The 'r' integer, which is used solely to set the
return value for this label, can also be removed.
CC: Cornelia Huck <address@hidden>
CC: Halil Pasic <address@hidden>
CC: Christian Borntraeger <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
---
hw/s390x/sclp.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index f57ce7b739..af0bfbc2ec 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -197,24 +197,20 @@ int sclp_service_call(CPUS390XState *env, uint64_t sccb,
uint32_t code)
{
SCLPDevice *sclp = get_sclp_device();
SCLPDeviceClass *sclp_c = SCLP_GET_CLASS(sclp);
- int r = 0;
SCCB work_sccb;
hwaddr sccb_len = sizeof(SCCB);
/* first some basic checks on program checks */
if (env->psw.mask & PSW_MASK_PSTATE) {
- r = -PGM_PRIVILEGED;
- goto out;
+ return -PGM_PRIVILEGED;
}
if (cpu_physical_memory_is_io(sccb)) {
- r = -PGM_ADDRESSING;
- goto out;
+ return -PGM_ADDRESSING;
}
if ((sccb & ~0x1fffUL) == 0 || (sccb & ~0x1fffUL) == env->psa
|| (sccb & ~0x7ffffff8UL) != 0) {
- r = -PGM_SPECIFICATION;
- goto out;
+ return -PGM_SPECIFICATION;
}
/*
@@ -226,8 +222,7 @@ int sclp_service_call(CPUS390XState *env, uint64_t sccb,
uint32_t code)
/* Valid sccb sizes */
if (be16_to_cpu(work_sccb.h.length) < sizeof(SCCBHeader)) {
- r = -PGM_SPECIFICATION;
- goto out;
+ return -PGM_SPECIFICATION;
}
switch (code & SCLP_CMD_CODE_MASK) {
@@ -257,8 +252,7 @@ out_write:
sclp_c->service_interrupt(sclp, sccb);
-out:
- return r;
+ return 0;
}
static void service_interrupt(SCLPDevice *sclp, uint32_t sccb)
--
2.24.1
- Re: [PATCH v1 31/59] util/aio-posix.c: remove unneeded 'out' label in aio_epoll, (continued)
- [PATCH v1 32/59] qemu-img.c: remove 'out4' label in img_compare, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 33/59] ipmi/ipmi_bmc_sim.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 34/59] ipmi/ipmi_bt.c: remove unneeded label in ipmi_bt_handle_event, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 35/59] ipmi_bmc_extern.c: remove unneeded label in ipmi_bmc_extern_handle_command, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 36/59] ipmi/ipmi_kcs.c: remove unneeded label in ipmi_kcs_handle_event, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 37/59] s390x/event-facility.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 38/59] s390x/sclp.c: remove unneeded label in sclp_service_call(),
Daniel Henrique Barboza <=
- [PATCH v1 39/59] usb/dev-mtp.c: remove unneeded label in write_retry(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 40/59] hsb/hcd-ehci.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 41/59] intc/s390_flic_kvm.c: remove unneeded label in kvm_flic_load(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 42/59] i386/intel_iommu.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06