qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Yoshinori Sato <ysato@users.sourceforge.jp>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Magnus Damm <magnus.damm@gmail.com>
Subject: [PATCH 3/3] hw/timer/sh_timer: Remove superfluous "break" statements
Date: Tue, 20 Oct 2020 17:39:35 +0200	[thread overview]
Message-ID: <20201020153935.54315-4-thuth@redhat.com> (raw)
In-Reply-To: <20201020153935.54315-1-thuth@redhat.com>

hw_error() is marked as QEMU_NORETURN, so the "break" statements
after this function are just dead code.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/timer/sh_timer.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c
index 934daaa7dc..58af1a1edb 100644
--- a/hw/timer/sh_timer.c
+++ b/hw/timer/sh_timer.c
@@ -125,7 +125,6 @@ static void sh_timer_write(void *opaque, hwaddr offset,
             /* fallthrough */
         default:
             hw_error("sh_timer_write: Reserved TPSC value\n");
-            break;
         }
         switch ((value & TIMER_TCR_CKEG) >> 3) {
         case 0:
@@ -139,7 +138,6 @@ static void sh_timer_write(void *opaque, hwaddr offset,
             /* fallthrough */
         default:
             hw_error("sh_timer_write: Reserved CKEG value\n");
-            break;
         }
         switch ((value & TIMER_TCR_ICPE) >> 6) {
         case 0:
@@ -152,7 +150,6 @@ static void sh_timer_write(void *opaque, hwaddr offset,
             /* fallthrough */
         default:
             hw_error("sh_timer_write: Reserved ICPE value\n");
-            break;
         }
         if ((value & TIMER_TCR_UNF) == 0) {
             s->int_level = 0;
-- 
2.18.2



  parent reply	other threads:[~2020-10-20 15:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 15:39 [PATCH 0/3] sh4: Trivial clean-ups for sh_timer.c Thomas Huth
2020-10-20 15:39 ` [PATCH 1/3] hw/timer/sh_timer: Coding style clean-up Thomas Huth
2020-10-24 20:06   ` Philippe Mathieu-Daudé
2020-10-20 15:39 ` [PATCH 2/3] hw/timer/sh_timer: Silence warnings about missing fallthrough statements Thomas Huth
2020-10-24 20:10   ` Philippe Mathieu-Daudé
2020-10-20 15:39 ` Thomas Huth [this message]
2020-10-24 20:10   ` [PATCH 3/3] hw/timer/sh_timer: Remove superfluous "break" statements Philippe Mathieu-Daudé
2020-10-21 16:48 ` [PATCH 0/3] sh4: Trivial clean-ups for sh_timer.c Richard Henderson
2020-10-25  0:38 ` Philippe Mathieu-Daudé

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=20201020153935.54315-4-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=magnus.damm@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=ysato@users.sourceforge.jp \
    /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;
as well as URLs for NNTP newsgroup(s).