Skip to contentSkip to conversation

tcg/riscv: Remove superfluous breaks

PATCH Applied Yi Wang 2 participants 3 messages Jul 13, 2020 RISC-V

lore
Share & tools
lore

Yi Wang

author
#0 lore raw

PATCH 1/1 tcg/riscv: Remove superfluous breaks

From: Liao Pingfang <[email protected]>

Remove superfluous breaks, as there is a "return" before them.

---
 tcg/riscv/tcg-target.inc.c | 2 --
 1 file changed, 2 deletions(-)
tcg/riscv/tcg-target.inc.c +0 -2
index 2bc0ba7..3c11ab8 100644
@@ -502,10 +502,8 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
         break;
     case R_RISCV_JAL:
         return reloc_jimm20(code_ptr, (tcg_insn_unit *)value);
-        break;
     case R_RISCV_CALL:
         return reloc_call(code_ptr, (tcg_insn_unit *)value);
-        break;
     default:
         tcg_abort();
     }
Signature · 1 line
2.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Yi Wang

From: Liao Pingfang <[email protected]>

Remove superfluous breaks, as there is a "return" before them.

Alistair

Quoted 23 lines
---
 tcg/riscv/tcg-target.inc.c | 2 --
 1 file changed, 2 deletions(-)
tcg/riscv/tcg-target.inc.c +0 -3
index 2bc0ba7..3c11ab8 100644
@@ -502,10 +502,8 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
         break;
     case R_RISCV_JAL:
         return reloc_jimm20(code_ptr, (tcg_insn_unit *)value);
-        break;
     case R_RISCV_CALL:
         return reloc_call(code_ptr, (tcg_insn_unit *)value);
-        break;
     default:
         tcg_abort();
     }
--

2.9.5

#2 lore raw
In reply to Yi Wang
Quoted 6 lines · Yi Wang

From: Liao Pingfang <[email protected]>

Remove superfluous breaks, as there is a "return" before them.

Thanks!

Applied to riscv-to-apply.next

Alistair

Quoted 23 lines
---
 tcg/riscv/tcg-target.inc.c | 2 --
 1 file changed, 2 deletions(-)
tcg/riscv/tcg-target.inc.c +0 -3
index 2bc0ba7..3c11ab8 100644
@@ -502,10 +502,8 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
         break;
     case R_RISCV_JAL:
         return reloc_jimm20(code_ptr, (tcg_insn_unit *)value);
-        break;
     case R_RISCV_CALL:
         return reloc_call(code_ptr, (tcg_insn_unit *)value);
-        break;
     default:
         tcg_abort();
     }
--

2.9.5