Commit 41de5963 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'Wimplicit-fallthrough-5.3-rc5' of...

Merge tag 'Wimplicit-fallthrough-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux

Pull fallthrough fixes from Gustavo A. R. Silva:
 "Fix sh mainline builds:

   - Fix fall-through warning in sh.

   - Fix missing break bug in sh (this is a 10-year-old bug)

  Currently, mainline builds for sh are broken. These patches fix that"

* tag 'Wimplicit-fallthrough-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
  sh: kernel: hw_breakpoint: Fix missing break in switch statement
  sh: kernel: disassemble: Mark expected switch fall-throughs
parents e22a97a2 1ee1119d
...@@ -475,8 +475,6 @@ static void print_sh_insn(u32 memaddr, u16 insn) ...@@ -475,8 +475,6 @@ static void print_sh_insn(u32 memaddr, u16 insn)
printk("dbr"); printk("dbr");
break; break;
case FD_REG_N: case FD_REG_N:
if (0)
goto d_reg_n;
case F_REG_N: case F_REG_N:
printk("fr%d", rn); printk("fr%d", rn);
break; break;
...@@ -488,7 +486,7 @@ static void print_sh_insn(u32 memaddr, u16 insn) ...@@ -488,7 +486,7 @@ static void print_sh_insn(u32 memaddr, u16 insn)
printk("xd%d", rn & ~1); printk("xd%d", rn & ~1);
break; break;
} }
d_reg_n: /* else, fall through */
case D_REG_N: case D_REG_N:
printk("dr%d", rn); printk("dr%d", rn);
break; break;
...@@ -497,6 +495,7 @@ static void print_sh_insn(u32 memaddr, u16 insn) ...@@ -497,6 +495,7 @@ static void print_sh_insn(u32 memaddr, u16 insn)
printk("xd%d", rm & ~1); printk("xd%d", rm & ~1);
break; break;
} }
/* else, fall through */
case D_REG_M: case D_REG_M:
printk("dr%d", rm); printk("dr%d", rm);
break; break;
......
...@@ -157,6 +157,7 @@ int arch_bp_generic_fields(int sh_len, int sh_type, ...@@ -157,6 +157,7 @@ int arch_bp_generic_fields(int sh_len, int sh_type,
switch (sh_type) { switch (sh_type) {
case SH_BREAKPOINT_READ: case SH_BREAKPOINT_READ:
*gen_type = HW_BREAKPOINT_R; *gen_type = HW_BREAKPOINT_R;
break;
case SH_BREAKPOINT_WRITE: case SH_BREAKPOINT_WRITE:
*gen_type = HW_BREAKPOINT_W; *gen_type = HW_BREAKPOINT_W;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment