public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>
Cc: "Ard Biesheuvel" <ard.biesheuvel@arm.com>,
	"Jordan Justen" <jordan.l.justen@intel.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Rebecca Cran" <rebecca@bsdio.com>
Subject: [PATCH 3/6] OvmfPkg/ResetSystemLib: improve coding style in ResetSystem()
Date: Fri, 17 Apr 2020 17:37:48 +0200	[thread overview]
Message-ID: <20200417153751.7110-4-lersek@redhat.com> (raw)
In-Reply-To: <20200417153751.7110-1-lersek@redhat.com>

The cases under ResetSystem() currently mix "break"s with "return"s for no
good reason. Use "break" consistently.

(The inconsistency was introduced in commit 84c0b80de716,
"OvmfPkg/ResetSystemLib: Add new API ResetSystem", 2019-04-28.)

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2675
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
index 23816183a953..0fc142325ece 100644
--- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -157,13 +157,13 @@ ResetSystem (
 
   case EfiResetShutdown:
     ResetShutdown ();
-    return;
+    break;
 
   case EfiResetPlatformSpecific:
     ResetPlatformSpecific (DataSize, ResetData);
-    return;
+    break;
 
   default:
-    return;
+    break;
   }
 }
-- 
2.19.1.3.g30247aa5d201



  parent reply	other threads:[~2020-04-17 15:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 15:37 [PATCH 0/6] OvmfPkg/ResetSystemLib: clean up, refactor, fix Laszlo Ersek
2020-04-17 15:37 ` [PATCH 1/6] OvmfPkg/ResetSystemLib: wrap long lines Laszlo Ersek
2020-04-17 16:01   ` Philippe Mathieu-Daudé
2020-04-17 15:37 ` [PATCH 2/6] OvmfPkg/ResetSystemLib: clean up library dependencies Laszlo Ersek
2020-04-17 16:02   ` Philippe Mathieu-Daudé
2020-04-17 15:37 ` Laszlo Ersek [this message]
2020-04-17 16:02   ` [PATCH 3/6] OvmfPkg/ResetSystemLib: improve coding style in ResetSystem() Philippe Mathieu-Daudé
2020-04-17 15:37 ` [PATCH 4/6] OvmfPkg/ResetSystemLib: factor out ResetShutdown() Laszlo Ersek
2020-04-17 16:05   ` Philippe Mathieu-Daudé
2020-04-17 15:37 ` [PATCH 5/6] OvmfPkg/ResetSystemLib: rename to BaseResetSystemLib Laszlo Ersek
2020-04-21 17:27   ` [edk2-devel] " Laszlo Ersek
2020-04-21 18:08     ` Philippe Mathieu-Daudé
2020-04-17 15:37 ` [PATCH 6/6] OvmfPkg/ResetSystemLib: introduce the DxeResetSystemLib instance Laszlo Ersek
2020-04-17 16:23   ` Philippe Mathieu-Daudé
2020-04-17 15:59 ` [PATCH 0/6] OvmfPkg/ResetSystemLib: clean up, refactor, fix Ard Biesheuvel
2020-04-17 16:19   ` Philippe Mathieu-Daudé
2020-04-20  9:48     ` Laszlo Ersek
2020-04-20 10:17       ` Philippe Mathieu-Daudé
2020-04-20  9:46   ` Laszlo Ersek
2020-04-21 17:49 ` Rebecca Cran
2020-04-22 20:35 ` [edk2-devel] " Laszlo Ersek

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-list 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=20200417153751.7110-4-lersek@redhat.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox