Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iop2G-0006Fa-GZ for mharc-qemu-trivial@gnu.org; Tue, 07 Jan 2020 08:36:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48115) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iop2B-00064D-Pz for qemu-trivial@nongnu.org; Tue, 07 Jan 2020 08:36:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iop2A-00083m-5X for qemu-trivial@nongnu.org; Tue, 07 Jan 2020 08:36:35 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:56848 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iop2A-00083B-2M for qemu-trivial@nongnu.org; Tue, 07 Jan 2020 08:36:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578404193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:openpgp:openpgp; bh=34RMSZkL48no063to1I0icdNEnW7GdgTFsYRTceuYaQ=; b=cafzCUrXwI+aM/44d1POHfS6xErjWLK2IQvmOqy5aI0avwI115CpmyAAkvL+CFVmb/I8Ew UsX29p+YmIuEXQSRGTf8hBk7G4ge7lKL/kXBnhNXCOGF24M5ULefuDnXMuFjlQzgsGcZzJ SJRgbXRcxtqbpFH7Cu5cDM6h5lpEARI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-339-j9UQCtXuOCOZhDoEBbdTfg-1; Tue, 07 Jan 2020 08:36:30 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F076107ACC5; Tue, 7 Jan 2020 13:36:29 +0000 (UTC) Received: from thuth.remote.csb (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 60E8E7C364; Tue, 7 Jan 2020 13:36:27 +0000 (UTC) Subject: Re: [PATCH v1 37/59] s390x/event-facility.c: remove unneeded labels To: Daniel Henrique Barboza , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Halil Pasic , Christian Borntraeger , Cornelia Huck , qemu-s390x@nongnu.org References: <20200106182425.20312-1-danielhb413@gmail.com> <20200106182425.20312-38-danielhb413@gmail.com> From: Thomas Huth Openpgp: preference=signencrypt Message-ID: <7a274241-0844-b068-527a-bec07dbf207c@redhat.com> Date: Tue, 7 Jan 2020 14:36:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200106182425.20312-38-danielhb413@gmail.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: j9UQCtXuOCOZhDoEBbdTfg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2020 13:36:40 -0000 On 06/01/2020 19.24, Daniel Henrique Barboza wrote: > 'out' label from write_event_mask(), handle_sccb_read_events() > and write_event_data() can be replaced by 'return'. > > CC: Cornelia Huck > CC: Halil Pasic > CC: Christian Borntraeger > Signed-off-by: Daniel Henrique Barboza > --- > hw/s390x/event-facility.c | 21 ++++++--------------- > 1 file changed, 6 insertions(+), 15 deletions(-) > > diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c > index 6afe278cad..f3b9661f32 100644 > --- a/hw/s390x/event-facility.c > +++ b/hw/s390x/event-facility.c > @@ -182,11 +182,11 @@ static void write_event_data(SCLPEventFacility *ef, SCCB *sccb) > { > if (sccb->h.function_code != SCLP_FC_NORMAL_WRITE) { > sccb->h.response_code = cpu_to_be16(SCLP_RC_INVALID_FUNCTION); > - goto out; > + return; > } > if (be16_to_cpu(sccb->h.length) < 8) { > sccb->h.response_code = cpu_to_be16(SCLP_RC_INSUFFICIENT_SCCB_LENGTH); > - goto out; > + return; > } > /* first do a sanity check of the write events */ > sccb->h.response_code = cpu_to_be16(write_event_length_check(sccb)); > @@ -196,9 +196,6 @@ static void write_event_data(SCLPEventFacility *ef, SCCB *sccb) > sccb->h.response_code = > cpu_to_be16(handle_sccb_write_events(ef, sccb)); > } > - > -out: > - return; > } > > static uint16_t handle_sccb_read_events(SCLPEventFacility *ef, SCCB *sccb, > @@ -262,7 +259,7 @@ static void read_event_data(SCLPEventFacility *ef, SCCB *sccb) > > if (be16_to_cpu(sccb->h.length) != SCCB_SIZE) { > sccb->h.response_code = cpu_to_be16(SCLP_RC_INSUFFICIENT_SCCB_LENGTH); > - goto out; > + return; > } > > sclp_cp_receive_mask = ef->receive_mask; > @@ -280,18 +277,15 @@ static void read_event_data(SCLPEventFacility *ef, SCCB *sccb) > (sclp_active_selection_mask & ~sclp_cp_receive_mask)) { > sccb->h.response_code = > cpu_to_be16(SCLP_RC_INVALID_SELECTION_MASK); > - goto out; > + return; > } > break; > default: > sccb->h.response_code = cpu_to_be16(SCLP_RC_INVALID_FUNCTION); > - goto out; > + return; > } > sccb->h.response_code = cpu_to_be16( > handle_sccb_read_events(ef, sccb, sclp_active_selection_mask)); > - > -out: > - return; > } > > static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb) > @@ -303,7 +297,7 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb) > if (!mask_length || (mask_length > SCLP_EVENT_MASK_LEN_MAX) || > ((mask_length != 4) && !ef->allow_all_mask_sizes)) { > sccb->h.response_code = cpu_to_be16(SCLP_RC_INVALID_MASK_LENGTH); > - goto out; > + return; > } > > /* > @@ -328,9 +322,6 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb) > > sccb->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_COMPLETION); > ef->mask_length = mask_length; > - > -out: > - return; > } > > /* qemu object creation and initialization functions */ > Reviewed-by: Thomas Huth