All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>,
	Daniel Henrique Barboza <danielhb413@gmail.com>,
	qemu-devel@nongnu.org, Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org
Subject: [PULL 01/15] s390x/sclp.c: remove unneeded label in sclp_service_call()
Date: Mon, 27 Jan 2020 13:20:02 +0100	[thread overview]
Message-ID: <20200127122016.18752-2-cohuck@redhat.com> (raw)
In-Reply-To: <20200127122016.18752-1-cohuck@redhat.com>

From: Daniel Henrique Barboza <danielhb413@gmail.com>

'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 <cohuck@redhat.com>
CC: Halil Pasic <pasic@linux.ibm.com>
CC: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200106182425.20312-39-danielhb413@gmail.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 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 f57ce7b73943..af0bfbc2eca7 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.21.1



  reply	other threads:[~2020-01-27 12:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27 12:20 [PULL 00/15] s390x update Cornelia Huck
2020-01-27 12:20 ` Cornelia Huck [this message]
2020-01-27 12:20 ` [PULL 02/15] intc/s390_flic_kvm.c: remove unneeded label in kvm_flic_load() Cornelia Huck
2020-01-27 12:20 ` [PULL 03/15] s390x/event-facility.c: remove unneeded labels Cornelia Huck
2020-01-27 12:20 ` [PULL 04/15] s390x: adapter routes error handling Cornelia Huck
2020-01-27 12:20 ` [PULL 05/15] s390x/event-facility: fix error propagation Cornelia Huck
2020-01-27 12:20 ` [PULL 06/15] target/s390x: Remove duplicated ifdef macro Cornelia Huck
2020-01-27 12:20 ` [PULL 07/15] docs/devel: fix stable process doc formatting Cornelia Huck
2020-01-27 12:20 ` [PULL 08/15] target/s390x/kvm: Enable adapter interruption suppression again Cornelia Huck
2020-01-27 12:20 ` [PULL 09/15] target/s390x: Move struct DisasFields definition earlier Cornelia Huck
2020-01-27 12:20 ` [PULL 10/15] target/s390x: Remove DisasFields argument from callbacks Cornelia Huck
2020-01-27 12:20 ` [PULL 11/15] target/s390x: Pass DisasContext to get_field and have_field Cornelia Huck
2020-01-27 12:20 ` [PULL 12/15] target/s390x: Move DisasFields into DisasContext Cornelia Huck
2020-01-27 12:20 ` [PULL 13/15] target/s390x: Remove DisasFields argument from extract_insn Cornelia Huck
2020-01-27 12:20 ` [PULL 14/15] hw/s390x: Add a more verbose comment about get_machine_class() and the wrappers Cornelia Huck
2020-01-27 12:20 ` [PULL 15/15] s390x: sigp: Fix sense running reporting Cornelia Huck
2020-01-27 13:54 ` [PULL 00/15] s390x update Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200127122016.18752-2-cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=danielhb413@gmail.com \
    --cc=pasic@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.