linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vt: annotate implicit fall throughs
@ 2019-01-14 20:41 Mathieu Malaterre
  2019-01-14 20:50 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Malaterre @ 2019-01-14 20:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Mathieu Malaterre, Jiri Slaby, linux-kernel

There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1). Fix them up.

This commit remove the following warning:

  drivers/tty/vt/vt.c:2112:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
  drivers/tty/vt/vt.c:2237:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 drivers/tty/vt/vt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 41ec8e5010f3..e4f8caed26af 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -2111,6 +2111,7 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
 		lf(vc);
 		if (!is_kbd(vc, lnm))
 			return;
+		/* fall through */
 	case 13:
 		cr(vc);
 		return;
@@ -2236,6 +2237,7 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
 		vc->vc_ques = (c == '?');
 		if (vc->vc_ques)
 			return;
+		/* fall through */
 	case ESgetpars:
 		if (c == ';' && vc->vc_npar < NPAR - 1) {
 			vc->vc_npar++;
-- 
2.19.2


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

* Re: [PATCH] vt: annotate implicit fall throughs
  2019-01-14 20:41 [PATCH] vt: annotate implicit fall throughs Mathieu Malaterre
@ 2019-01-14 20:50 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-14 20:50 UTC (permalink / raw)
  To: Mathieu Malaterre, Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-kernel



On 1/14/19 2:41 PM, Mathieu Malaterre wrote:
> There is a plan to build the kernel with -Wimplicit-fallthrough and
> these places in the code produced warnings (W=1). Fix them up.
> 
> This commit remove the following warning:
> 
>    drivers/tty/vt/vt.c:2112:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    drivers/tty/vt/vt.c:2237:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Thanks, Mathieu.

--
Gustavo

> ---
>   drivers/tty/vt/vt.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index 41ec8e5010f3..e4f8caed26af 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -2111,6 +2111,7 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
>   		lf(vc);
>   		if (!is_kbd(vc, lnm))
>   			return;
> +		/* fall through */
>   	case 13:
>   		cr(vc);
>   		return;
> @@ -2236,6 +2237,7 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
>   		vc->vc_ques = (c == '?');
>   		if (vc->vc_ques)
>   			return;
> +		/* fall through */
>   	case ESgetpars:
>   		if (c == ';' && vc->vc_npar < NPAR - 1) {
>   			vc->vc_npar++;
> 

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

end of thread, other threads:[~2019-01-14 20:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 20:41 [PATCH] vt: annotate implicit fall throughs Mathieu Malaterre
2019-01-14 20:50 ` Gustavo A. R. Silva

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).