From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>,
Wan ZongShun <mcuos.com@gmail.com>,
Boris Brezillon <bbrezillon@kernel.org>,
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 v2] mtd: rawnand: mark expected switch fall-throughs
Date: Fri, 12 Apr 2019 09:24:19 +0200 [thread overview]
Message-ID: <20190412092419.6f5a6432@xps13> (raw)
In-Reply-To: <017bdd52-8d1f-f746-6e1c-4d38491b2d6a@embeddedor.com>
Hi Gustavo,
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote on Thu, 11 Apr
2019 17:20:31 -0500:
> On 4/11/19 5:10 PM, Miquel Raynal wrote:
> > Hi Gustavo,
> >
> > "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote on Thu, 11 Apr
> > 2019 13:30:31 -0500:
> >
> >> Hi Miquel,
> >>
> >> On 2/5/19 6:55 AM, Miquel Raynal wrote:
> >> [..]
> >>>> @@ -3280,12 +3280,14 @@ static void onenand_check_features(struct mtd_info *mtd)
> >>>> if ((this->version_id & 0xf) == 0xe)
> >>>> this->options |= ONENAND_HAS_NOP_1;
> >>>> }
> >>>> + /* fall through */
> >>>>
> >>>> case ONENAND_DEVICE_DENSITY_2Gb:
> >>>> /* 2Gb DDP does not have 2 plane */
> >>>> if (!ONENAND_IS_DDP(this))
> >>>> this->options |= ONENAND_HAS_2PLANE;
> >>>> this->options |= ONENAND_HAS_UNLOCK_ALL;
> >>>> + /* fall through */
> >>>
> >>> This looks strange.
> >>>
> >>> In ONENAND_DEVICE_DENSITY_2Gb:
> >>> ONENAND_HAS_UNLOCK_ALL is set unconditionally.
> >>>
> >>> But then, under ONENAND_DEVICE_DENSITY_1Gb, the same option is set only
> >>> if process is evaluated to true.
> >>>
> >>> Same problem with ONENAND_HAS_2PLANE:
> >>> - it is set in ONENAND_DEVICE_DENSITY_4Gb only if ONENAND_IS_DDP()
> >>> - it is unset in ONENAND_DEVICE_DENSITY_2Gb only if !ONENAND_IS_DDP()
> >>>
> >>> Maybe this portion should be reworked because I am unsure if this is a
> >>> missing fall through or a bug.
> >>>
> >>
> >> I wonder if you had the chance to take a look into this piece of code.
> >>
> >> Thanks
> >> --
> >> Gustavo
> >
> > What do you mean?
> >
>
> You commented that the piece of code above should be reworked. So, it wasn't
> clear to me who was going to do that; and that's why I'm asking if you took
> a look into it and finally determine whether we are dealing with an actual
> bug or a false positive.
Yes please do it, I don't have the time and I don't plan to do it
myself.
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: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>,
Wan ZongShun <mcuos.com@gmail.com>,
Boris Brezillon <bbrezillon@kernel.org>,
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 v2] mtd: rawnand: mark expected switch fall-throughs
Date: Fri, 12 Apr 2019 09:24:19 +0200 [thread overview]
Message-ID: <20190412092419.6f5a6432@xps13> (raw)
In-Reply-To: <017bdd52-8d1f-f746-6e1c-4d38491b2d6a@embeddedor.com>
Hi Gustavo,
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote on Thu, 11 Apr
2019 17:20:31 -0500:
> On 4/11/19 5:10 PM, Miquel Raynal wrote:
> > Hi Gustavo,
> >
> > "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote on Thu, 11 Apr
> > 2019 13:30:31 -0500:
> >
> >> Hi Miquel,
> >>
> >> On 2/5/19 6:55 AM, Miquel Raynal wrote:
> >> [..]
> >>>> @@ -3280,12 +3280,14 @@ static void onenand_check_features(struct mtd_info *mtd)
> >>>> if ((this->version_id & 0xf) == 0xe)
> >>>> this->options |= ONENAND_HAS_NOP_1;
> >>>> }
> >>>> + /* fall through */
> >>>>
> >>>> case ONENAND_DEVICE_DENSITY_2Gb:
> >>>> /* 2Gb DDP does not have 2 plane */
> >>>> if (!ONENAND_IS_DDP(this))
> >>>> this->options |= ONENAND_HAS_2PLANE;
> >>>> this->options |= ONENAND_HAS_UNLOCK_ALL;
> >>>> + /* fall through */
> >>>
> >>> This looks strange.
> >>>
> >>> In ONENAND_DEVICE_DENSITY_2Gb:
> >>> ONENAND_HAS_UNLOCK_ALL is set unconditionally.
> >>>
> >>> But then, under ONENAND_DEVICE_DENSITY_1Gb, the same option is set only
> >>> if process is evaluated to true.
> >>>
> >>> Same problem with ONENAND_HAS_2PLANE:
> >>> - it is set in ONENAND_DEVICE_DENSITY_4Gb only if ONENAND_IS_DDP()
> >>> - it is unset in ONENAND_DEVICE_DENSITY_2Gb only if !ONENAND_IS_DDP()
> >>>
> >>> Maybe this portion should be reworked because I am unsure if this is a
> >>> missing fall through or a bug.
> >>>
> >>
> >> I wonder if you had the chance to take a look into this piece of code.
> >>
> >> Thanks
> >> --
> >> Gustavo
> >
> > What do you mean?
> >
>
> You commented that the piece of code above should be reworked. So, it wasn't
> clear to me who was going to do that; and that's why I'm asking if you took
> a look into it and finally determine whether we are dealing with an actual
> bug or a false positive.
Yes please do it, I don't have the time and I don't plan to do it
myself.
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: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Richard Weinberger <richard@nod.at>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Wan ZongShun <mcuos.com@gmail.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH v2] mtd: rawnand: mark expected switch fall-throughs
Date: Fri, 12 Apr 2019 09:24:19 +0200 [thread overview]
Message-ID: <20190412092419.6f5a6432@xps13> (raw)
In-Reply-To: <017bdd52-8d1f-f746-6e1c-4d38491b2d6a@embeddedor.com>
Hi Gustavo,
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote on Thu, 11 Apr
2019 17:20:31 -0500:
> On 4/11/19 5:10 PM, Miquel Raynal wrote:
> > Hi Gustavo,
> >
> > "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote on Thu, 11 Apr
> > 2019 13:30:31 -0500:
> >
> >> Hi Miquel,
> >>
> >> On 2/5/19 6:55 AM, Miquel Raynal wrote:
> >> [..]
> >>>> @@ -3280,12 +3280,14 @@ static void onenand_check_features(struct mtd_info *mtd)
> >>>> if ((this->version_id & 0xf) == 0xe)
> >>>> this->options |= ONENAND_HAS_NOP_1;
> >>>> }
> >>>> + /* fall through */
> >>>>
> >>>> case ONENAND_DEVICE_DENSITY_2Gb:
> >>>> /* 2Gb DDP does not have 2 plane */
> >>>> if (!ONENAND_IS_DDP(this))
> >>>> this->options |= ONENAND_HAS_2PLANE;
> >>>> this->options |= ONENAND_HAS_UNLOCK_ALL;
> >>>> + /* fall through */
> >>>
> >>> This looks strange.
> >>>
> >>> In ONENAND_DEVICE_DENSITY_2Gb:
> >>> ONENAND_HAS_UNLOCK_ALL is set unconditionally.
> >>>
> >>> But then, under ONENAND_DEVICE_DENSITY_1Gb, the same option is set only
> >>> if process is evaluated to true.
> >>>
> >>> Same problem with ONENAND_HAS_2PLANE:
> >>> - it is set in ONENAND_DEVICE_DENSITY_4Gb only if ONENAND_IS_DDP()
> >>> - it is unset in ONENAND_DEVICE_DENSITY_2Gb only if !ONENAND_IS_DDP()
> >>>
> >>> Maybe this portion should be reworked because I am unsure if this is a
> >>> missing fall through or a bug.
> >>>
> >>
> >> I wonder if you had the chance to take a look into this piece of code.
> >>
> >> Thanks
> >> --
> >> Gustavo
> >
> > What do you mean?
> >
>
> You commented that the piece of code above should be reworked. So, it wasn't
> clear to me who was going to do that; and that's why I'm asking if you took
> a look into it and finally determine whether we are dealing with an actual
> bug or a false positive.
Yes please do it, I don't have the time and I don't plan to do it
myself.
Thanks,
Miquèl
next prev parent reply other threads:[~2019-04-12 7:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 18:15 [PATCH v2] mtd: rawnand: mark expected switch fall-throughs Gustavo A. R. Silva
2019-01-28 18:15 ` Gustavo A. R. Silva
2019-01-28 18:15 ` Gustavo A. R. Silva
2019-02-05 12:55 ` Miquel Raynal
2019-02-05 12:55 ` Miquel Raynal
2019-02-05 12:55 ` Miquel Raynal
2019-02-08 17:11 ` Gustavo A. R. Silva
2019-02-08 17:11 ` Gustavo A. R. Silva
2019-02-08 17:11 ` Gustavo A. R. Silva
2019-04-11 18:30 ` Gustavo A. R. Silva
2019-04-11 18:30 ` Gustavo A. R. Silva
2019-04-11 18:30 ` Gustavo A. R. Silva
2019-04-11 22:10 ` Miquel Raynal
2019-04-11 22:10 ` Miquel Raynal
2019-04-11 22:10 ` Miquel Raynal
2019-04-11 22:20 ` Gustavo A. R. Silva
2019-04-11 22:20 ` Gustavo A. R. Silva
2019-04-11 22:20 ` Gustavo A. R. Silva
2019-04-12 7:24 ` Miquel Raynal [this message]
2019-04-12 7:24 ` Miquel Raynal
2019-04-12 7:24 ` Miquel Raynal
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=20190412092419.6f5a6432@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.