[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 37/59] s390x/event-facility.c: remove unneeded labels
From: |
Thomas Huth |
Subject: |
Re: [PATCH v1 37/59] s390x/event-facility.c: remove unneeded labels |
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 |
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 <address@hidden>
> CC: Halil Pasic <address@hidden>
> CC: Christian Borntraeger <address@hidden>
> Signed-off-by: Daniel Henrique Barboza <address@hidden>
> ---
> 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 <address@hidden>
- Re: [PATCH v1 37/59] s390x/event-facility.c: remove unneeded labels,
Thomas Huth <=