From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
Boris Brezillon <bbrezillon@kernel.org>
Cc: 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 12:23:35 -0600 [thread overview]
Message-ID: <c32b4041-14a6-afb1-8730-0ed9f7120592@embeddedor.com> (raw)
In-Reply-To: <20190128101344.1cc03eed@xps13>
Miquel, Boris,
On 1/28/19 3:13 AM, Miquel Raynal wrote:
> 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.
>
Yep. I get your point.
I've just sent v2: https://lore.kernel.org/patchwork/patch/1036251/
Thanks for the feedback.
--
Gustavo
prev parent reply other threads:[~2019-01-28 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 21:09 Gustavo A. R. Silva
2019-01-26 9:52 ` Boris Brezillon
2019-01-26 13:48 ` Gustavo A. R. Silva
2019-01-26 16:54 ` Boris Brezillon
2019-01-28 9:13 ` Miquel Raynal
2019-01-28 18:23 ` Gustavo A. R. Silva [this message]
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=c32b4041-14a6-afb1-8730-0ed9f7120592@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--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=miquel.raynal@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®