Commit 54b13723 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva

sh: kernel: disassemble: Mark expected switch fall-throughs

Remove logically dead code and mark switch cases where we are expecting
to fall through.

Fix the following warnings (Building: defconfig sh):

arch/sh/kernel/disassemble.c:478:8: warning: this statement may fall
through [-Wimplicit-fallthrough=]
arch/sh/kernel/disassemble.c:487:8: warning: this statement may fall
through [-Wimplicit-fallthrough=]
arch/sh/kernel/disassemble.c:496:8: warning: this statement may fall
through [-Wimplicit-fallthrough=]
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
parent 609488bc
...@@ -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;
......
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