All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Boris Brezillon <bbrezillon@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
	Wan ZongShun <mcuos.com@gmail.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-mtd@lists.infradead.org,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: mark expected switch fall-throughs
Date: Mon, 28 Jan 2019 10:13:44 +0100	[thread overview]
Message-ID: <20190128101344.1cc03eed@xps13> (raw)
In-Reply-To: <20190126175429.65e6bfd8@bbrezillon>

Hi Boris,

Boris Brezillon <bbrezillon@kernel.org> wrote on Sat, 26 Jan 2019
17:54:29 +0100:

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

Yes please, even if there is no GCC warning I think you can add one
here.


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Boris Brezillon <bbrezillon@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
	Wan ZongShun <mcuos.com@gmail.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-mtd@lists.infradead.org,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: mark expected switch fall-throughs
Date: Mon, 28 Jan 2019 10:13:44 +0100	[thread overview]
Message-ID: <20190128101344.1cc03eed@xps13> (raw)
In-Reply-To: <20190126175429.65e6bfd8@bbrezillon>

Hi Boris,

Boris Brezillon <bbrezillon@kernel.org> wrote on Sat, 26 Jan 2019
17:54:29 +0100:

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

Yes please, even if there is no GCC warning I think you can add one
here.


Thanks,
Miquèl

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Boris Brezillon <bbrezillon@kernel.org>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Kees Cook <keescook@chromium.org>,
	Wan ZongShun <mcuos.com@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-mtd@lists.infradead.org,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: mark expected switch fall-throughs
Date: Mon, 28 Jan 2019 10:13:44 +0100	[thread overview]
Message-ID: <20190128101344.1cc03eed@xps13> (raw)
In-Reply-To: <20190126175429.65e6bfd8@bbrezillon>

Hi Boris,

Boris Brezillon <bbrezillon@kernel.org> wrote on Sat, 26 Jan 2019
17:54:29 +0100:

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

Yes please, even if there is no GCC warning I think you can add one
here.


Thanks,
Miquèl

  reply	other threads:[~2019-01-28  9:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 21:09 [PATCH] mtd: rawnand: mark expected switch fall-throughs Gustavo A. R. Silva
2019-01-25 21:09 ` Gustavo A. R. Silva
2019-01-25 21:09 ` Gustavo A. R. Silva
2019-01-26  9:52 ` Boris Brezillon
2019-01-26  9:52   ` Boris Brezillon
2019-01-26  9:52   ` Boris Brezillon
2019-01-26 13:48   ` Gustavo A. R. Silva
2019-01-26 13:48     ` Gustavo A. R. Silva
2019-01-26 13:48     ` Gustavo A. R. Silva
2019-01-26 16:54     ` Boris Brezillon
2019-01-26 16:54       ` Boris Brezillon
2019-01-26 16:54       ` Boris Brezillon
2019-01-28  9:13       ` Miquel Raynal [this message]
2019-01-28  9:13         ` Miquel Raynal
2019-01-28  9:13         ` Miquel Raynal
2019-01-28 18:23         ` Gustavo A. R. Silva
2019-01-28 18:23           ` Gustavo A. R. Silva
2019-01-28 18:23           ` Gustavo A. R. Silva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190128101344.1cc03eed@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=gustavo@embeddedor.com \
    --cc=keescook@chromium.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=mcuos.com@gmail.com \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.