From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web12.79.1587139383662562982 for ; Fri, 17 Apr 2020 09:03:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bcInix5w; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587139382; 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; bh=EVF25w/a3GqzAL814rcaLJV3GIFTIZxjDF3o0YwKoRM=; b=bcInix5wObb7Q0QQIrQykLRa0HaP+/aDNavmQHKXz1S9WnmZzZ6VMpEN/DS9zIsux4DHB2 eb1AzhniVkJZYnkRPDKp15sgIittRLR/TyVh9WFrZXF8otfxvDhbT3+X3McxLgTGSF2jJT KSJ4YBWbNOCi3bO0PQXP9yI+rR2fLGc= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-61-0hYIlXZpNwuQuZkGVRRHCQ-1; Fri, 17 Apr 2020 12:03:01 -0400 X-MC-Unique: 0hYIlXZpNwuQuZkGVRRHCQ-1 Received: by mail-ed1-f72.google.com with SMTP id u6so916569edq.11 for ; Fri, 17 Apr 2020 09:03:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xxcjmWJvwJPSAUf3bzWUVOrWMVyiKkckpJGAyhV2nzE=; b=Rsu+ej4iztoCVXtvtQxdPFs3WAQnW5ZvfbwaQUmnyAPJOGtxrxjAWAH+frWomsGgJO yD6RJ0f9luFZUgCyKh54mR5w6YyUUekt8l90cybGaKJGz//O5OF0uQGFKkLKlJbQIugA Pdwm6xH3ISN11uCwoHhFIA8DTg+3c3mEtmgBvYNJsTg83+ngUlwlH3gG8P5wUsWLhU6s fN1zIzSfXEjqNJClNH3O0i13CGkMfz7fqxHsKLLLqFU7fYV3yMaKAqJgRaxNNEyBPFsv g7d4/ivWOzccUC0iiGGoMyy+va0no9X6fx59DwXvKQbxEbbXbK4/pRt5WkvT0wcxS90K 8J0g== X-Gm-Message-State: AGi0PuYaWpMP40DJh/kmKv2VJhgN/1PB8tV9HyfjXMQCIt09PUEppMbX olDuu6eng3XRp7+FqoTXzxqY95QDF3bIgHMCu8tRJ13tBwK3I3COt0KMLElEmT2wNQc7uasMdLN /y6g9sABZvIMJtA== X-Received: by 2002:a50:9eaf:: with SMTP id a44mr3843082edf.58.1587139379973; Fri, 17 Apr 2020 09:02:59 -0700 (PDT) X-Google-Smtp-Source: APiQypIr645TldZFdECyl500UoJiRjqGX7lPrh7q/i5s/fGZsoJKgGJC9zFf32ru7+4clxnqn5p98A== X-Received: by 2002:a50:9eaf:: with SMTP id a44mr3843058edf.58.1587139379743; Fri, 17 Apr 2020 09:02:59 -0700 (PDT) Return-Path: Received: from [192.168.1.39] (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id dd13sm3015493edb.46.2020.04.17.09.02.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Apr 2020 09:02:59 -0700 (PDT) Subject: Re: [PATCH 3/6] OvmfPkg/ResetSystemLib: improve coding style in ResetSystem() To: Laszlo Ersek , edk2-devel-groups-io Cc: Ard Biesheuvel , Jordan Justen , Rebecca Cran References: <20200417153751.7110-1-lersek@redhat.com> <20200417153751.7110-4-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <81392457-a126-8955-911d-95db2cc0e6d2@redhat.com> Date: Fri, 17 Apr 2020 18:02:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200417153751.7110-4-lersek@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 4/17/20 5:37 PM, Laszlo Ersek wrote: > The cases under ResetSystem() currently mix "break"s with "return"s for n= o > good reason. Use "break" consistently. >=20 > (The inconsistency was introduced in commit 84c0b80de716, > "OvmfPkg/ResetSystemLib: Add new API ResetSystem", 2019-04-28.) >=20 > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Philippe Mathieu-Daud=C3=A9 > Cc: Rebecca Cran > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2675 > Signed-off-by: Laszlo Ersek > --- > OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c b/OvmfPkg/Li= brary/ResetSystemLib/ResetSystemLib.c > index 23816183a953..0fc142325ece 100644 > --- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c > +++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c > @@ -157,13 +157,13 @@ ResetSystem ( > =20 > case EfiResetShutdown: > ResetShutdown (); > - return; > + break; > =20 > case EfiResetPlatformSpecific: > ResetPlatformSpecific (DataSize, ResetData); > - return; > + break; > =20 > default: > - return; > + break; > } > } >=20 Reviewed-by: Philippe Mathieu-Daude