linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kdb: kdb_keyboard: mark expected switch fall-throughs
@ 2018-08-05  4:18 Gustavo A. R. Silva
  2018-08-15 14:13 ` Daniel Thompson
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-05  4:18 UTC (permalink / raw)
  To: Jason Wessel, Daniel Thompson
  Cc: kgdb-bugreport, linux-kernel, Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced the code comments with
a proper "fall through" annotation, which is what GCC is expecting
to find.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 kernel/debug/kdb/kdb_keyboard.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/debug/kdb/kdb_keyboard.c b/kernel/debug/kdb/kdb_keyboard.c
index 118527a..750497b 100644
--- a/kernel/debug/kdb/kdb_keyboard.c
+++ b/kernel/debug/kdb/kdb_keyboard.c
@@ -173,11 +173,11 @@ int kdb_get_kbd_char(void)
 	case KT_LATIN:
 		if (isprint(keychar))
 			break;		/* printable characters */
-		/* drop through */
+		/* fall through */
 	case KT_SPEC:
 		if (keychar == K_ENTER)
 			break;
-		/* drop through */
+		/* fall through */
 	default:
 		return -1;	/* ignore unprintables */
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kdb: kdb_keyboard: mark expected switch fall-throughs
  2018-08-05  4:18 [PATCH] kdb: kdb_keyboard: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-08-15 14:13 ` Daniel Thompson
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Thompson @ 2018-08-15 14:13 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Jason Wessel; +Cc: kgdb-bugreport, linux-kernel

On 05/08/18 05:18, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that in this particular case, I replaced the code comments with
> a proper "fall through" annotation, which is what GCC is expecting
> to find.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>

> ---
>   kernel/debug/kdb/kdb_keyboard.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/debug/kdb/kdb_keyboard.c b/kernel/debug/kdb/kdb_keyboard.c
> index 118527a..750497b 100644
> --- a/kernel/debug/kdb/kdb_keyboard.c
> +++ b/kernel/debug/kdb/kdb_keyboard.c
> @@ -173,11 +173,11 @@ int kdb_get_kbd_char(void)
>   	case KT_LATIN:
>   		if (isprint(keychar))
>   			break;		/* printable characters */
> -		/* drop through */
> +		/* fall through */
>   	case KT_SPEC:
>   		if (keychar == K_ENTER)
>   			break;
> -		/* drop through */
> +		/* fall through */
>   	default:
>   		return -1;	/* ignore unprintables */
>   	}
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-15 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-05  4:18 [PATCH] kdb: kdb_keyboard: mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-15 14:13 ` Daniel Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).