2019-10-02 16:16:57

by Bartosz Golaszewski

[permalink] [raw]
Subject: [PATCH] sh: kgdb: fix an implicit fallthrough warning

From: Bartosz Golaszewski <[email protected]>

The switch case in arch/sh/kernel/kgdb.c can fallthrough. Add an
appropriate comment.

Signed-off-by: Bartosz Golaszewski <[email protected]>
---
arch/sh/kernel/kgdb.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/sh/kernel/kgdb.c b/arch/sh/kernel/kgdb.c
index 6d61f8cf4c13..0d5f3c9d52f3 100644
--- a/arch/sh/kernel/kgdb.c
+++ b/arch/sh/kernel/kgdb.c
@@ -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);
--
2.23.0


2019-10-03 10:30:29

by Daniel Thompson

[permalink] [raw]
Subject: Re: [PATCH] sh: kgdb: fix an implicit fallthrough warning

On Wed, Oct 02, 2019 at 05:47:56PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <[email protected]>
>
> The switch case in arch/sh/kernel/kgdb.c can fallthrough. Add an
> appropriate comment.
>
> Signed-off-by: Bartosz Golaszewski <[email protected]>

Reviewed-by: Daniel Thompson <[email protected]>

> ---
> arch/sh/kernel/kgdb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/sh/kernel/kgdb.c b/arch/sh/kernel/kgdb.c
> index 6d61f8cf4c13..0d5f3c9d52f3 100644
> --- a/arch/sh/kernel/kgdb.c
> +++ b/arch/sh/kernel/kgdb.c
> @@ -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);
> --
> 2.23.0
>