Skip to content

Commit

Permalink
sh: kgdb: Mark expected switch fall-throughs
Browse files Browse the repository at this point in the history
Mark switch cases where we are expecting to fall through.

This patch fixes the following error:

LINUX/arch/sh/kernel/kgdb.c: In function 'kgdb_arch_handle_exception':
LINUX/arch/sh/kernel/kgdb.c:267:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
if (kgdb_hex2long(&ptr, &addr))
^
LINUX/arch/sh/kernel/kgdb.c:269:2: note: here
case 'D':
^~~~

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
  • Loading branch information
Kuninori Morimoto authored and Gustavo A. R. Silva committed Dec 10, 2019
1 parent e42617b commit 3d519d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/sh/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
ptr = &remcomInBuffer[1];
if (kgdb_hex2long(&ptr, &addr))
linux_regs->pc = addr;
/* fallthrough */
case 'D':
case 'k':
atomic_set(&kgdb_cpu_doing_single_step, -1);
Expand Down

0 comments on commit 3d519d6

Please sign in to comment.