diff mbox series

[3/3] hw/timer/sh_timer: Remove superfluous "break" statements

Message ID 20201020153935.54315-4-thuth@redhat.com
State Superseded
Headers show
Series sh4: Trivial clean-ups for sh_timer.c | expand

Commit Message

Thomas Huth Oct. 20, 2020, 3:39 p.m. UTC
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(-)

Comments

Philippe Mathieu-Daudé Oct. 24, 2020, 8:10 p.m. UTC | #1
On 10/20/20 5:39 PM, Thomas Huth wrote:
> 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(-)


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

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;