[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bc24ebb5-45ce-f5d4-1427-d5e5786ded6f@suse.com>
Date: Mon, 9 Mar 2020 17:12:40 +0100
From: Jiri Slaby <jslaby@...e.com>
To: Sergey.Semin@...kalelectronics.ru,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Serge Semin <fancer.lancer@...il.com>,
Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Paul Burton <paulburton@...nel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 18/22] tty: mips_ejtag_fdc: Mark expected switch
fall-through
On 06. 03. 20, 13:47, Sergey.Semin@...kalelectronics.ru wrote:
> From: Serge Semin <Sergey.Semin@...kalelectronics.ru>
>
> Mark mips_ejtag_fdc_encode() methods switch-case-4 as expecting to
> fall through.
>
> This patch fixes the following warning:
>
> drivers/tty/mips_ejtag_fdc.c: In function ‘mips_ejtag_fdc_encode’:
> drivers/tty/mips_ejtag_fdc.c:245:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
> word.word &= 0x00ffffff;
> ~~~~~~~~~~^~~~~~~~~~~~~
> drivers/tty/mips_ejtag_fdc.c:246:2: note: here
> case 3:
> ^~~~
>
> Signed-off-by: Serge Semin <Sergey.Semin@...kalelectronics.ru>
> Signed-off-by: Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>
> Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
> Cc: Paul Burton <paulburton@...nel.org>
> Cc: Ralf Baechle <ralf@...ux-mips.org>
> ---
> drivers/tty/mips_ejtag_fdc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
> index 620d8488b83e..21e76a2ec182 100644
> --- a/drivers/tty/mips_ejtag_fdc.c
> +++ b/drivers/tty/mips_ejtag_fdc.c
> @@ -243,6 +243,7 @@ static struct fdc_word mips_ejtag_fdc_encode(const char **ptrs,
> /* Fall back to a 3 byte encoding */
> word.bytes = 3;
> word.word &= 0x00ffffff;
> + /* Fall through */
We now have "fallthrough;", so I believe you should use that instead of
comments.
thanks,
--
js
suse labs
Powered by blists - more mailing lists