lkml.org 
[lkml]   [2019]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mtd: rawnand: mark expected switch fall-throughs
On Sat, 26 Jan 2019 07:48:50 -0600
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:

> Hey Boris,
>
> On 1/26/19 3:52 AM, Boris Brezillon wrote:
> > On Fri, 25 Jan 2019 15:09:50 -0600
> > "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> >
> >> diff --git a/drivers/mtd/nand/raw/nandsim.c b/drivers/mtd/nand/raw/nandsim.c
> >> index 933d1a629c51..d33e15dc4cdc 100644
> >> --- a/drivers/mtd/nand/raw/nandsim.c
> >> +++ b/drivers/mtd/nand/raw/nandsim.c
> >> @@ -2251,9 +2251,10 @@ static int __init ns_init_module(void)
> >>
> >> switch (bbt) {
> >> case 2:
> >> - chip->bbt_options |= NAND_BBT_NO_OOB;
> >> + chip->bbt_options |= NAND_BBT_NO_OOB;
> >> + /* fall through */
> >> case 1:
> >> - chip->bbt_options |= NAND_BBT_USE_FLASH;
> >> + chip->bbt_options |= NAND_BBT_USE_FLASH;
> >
> > You miss a '/* fall through */' here.
> >
>
> Not really. Notice that in this case the code falls through
> to a break statement.

Still find it weird to mandate fall through comments in all cases but
this one...

>
> >> case 0:
> >> break;
> >> default:
>
> Thanks
> --
> Gustavo
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

\
 
 \ /
  Last update: 2019-01-26 17:55    [W:0.056 / U:3.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site