All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Boris Brezillon <bbrezillon@kernel.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] mtd: cfi_util: mark expected switch fall-throughs
Date: Tue, 7 May 2019 17:49:05 +0200 (CEST)	[thread overview]
Message-ID: <785015370.48464.1557244145722.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <3034821c-3cd0-b0c5-a6fd-548fd87486a4@embeddedor.com>

----- Ursprüngliche Mail -----
> Von: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
> An: "Miquel Raynal" <miquel.raynal@bootlin.com>
> CC: "David Woodhouse" <dwmw2@infradead.org>, "Brian Norris" <computersforpeace@gmail.com>, "Boris Brezillon"
> <bbrezillon@kernel.org>, "Marek Vasut" <marek.vasut@gmail.com>, "richard" <richard@nod.at>, "linux-mtd"
> <linux-mtd@lists.infradead.org>, "linux-kernel" <linux-kernel@vger.kernel.org>, "Kees Cook" <keescook@chromium.org>
> Gesendet: Dienstag, 7. Mai 2019 16:54:12
> Betreff: Re: [PATCH] mtd: cfi_util: mark expected switch fall-throughs

> Hi all,
> 
> Thanks a lot for this, Richard:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/log/?h=mtd%2Fnext&qt=grep&q=fall-through
> 
> There are only two of these warnings left to be addressed in
> MTD[1]:
> 
>        > @@ -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.
> 
> 
> Thanks
> --
> Gustavo
> 
> [1] https://lore.kernel.org/patchwork/patch/1036251/

Did we miss this patch? AFAICT it is in -next too.

Thanks,
//richard

WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>,
	Boris Brezillon <bbrezillon@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] mtd: cfi_util: mark expected switch fall-throughs
Date: Tue, 7 May 2019 17:49:05 +0200 (CEST)	[thread overview]
Message-ID: <785015370.48464.1557244145722.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <3034821c-3cd0-b0c5-a6fd-548fd87486a4@embeddedor.com>

----- Ursprüngliche Mail -----
> Von: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
> An: "Miquel Raynal" <miquel.raynal@bootlin.com>
> CC: "David Woodhouse" <dwmw2@infradead.org>, "Brian Norris" <computersforpeace@gmail.com>, "Boris Brezillon"
> <bbrezillon@kernel.org>, "Marek Vasut" <marek.vasut@gmail.com>, "richard" <richard@nod.at>, "linux-mtd"
> <linux-mtd@lists.infradead.org>, "linux-kernel" <linux-kernel@vger.kernel.org>, "Kees Cook" <keescook@chromium.org>
> Gesendet: Dienstag, 7. Mai 2019 16:54:12
> Betreff: Re: [PATCH] mtd: cfi_util: mark expected switch fall-throughs

> Hi all,
> 
> Thanks a lot for this, Richard:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/log/?h=mtd%2Fnext&qt=grep&q=fall-through
> 
> There are only two of these warnings left to be addressed in
> MTD[1]:
> 
>        > @@ -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.
> 
> 
> Thanks
> --
> Gustavo
> 
> [1] https://lore.kernel.org/patchwork/patch/1036251/

Did we miss this patch? AFAICT it is in -next too.

Thanks,
//richard

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

  reply	other threads:[~2019-05-07 15:49 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 18:02 [PATCH] mtd: cfi_util: mark expected switch fall-throughs Gustavo A. R. Silva
2019-02-08 18:02 ` Gustavo A. R. Silva
2019-03-20 20:20 ` Gustavo A. R. Silva
2019-03-20 20:20   ` Gustavo A. R. Silva
2019-03-20 21:05   ` Richard Weinberger
2019-03-20 21:05     ` Richard Weinberger
2019-03-20 21:23     ` Gustavo A. R. Silva
2019-03-20 21:23       ` Gustavo A. R. Silva
2019-03-20 23:25       ` Richard Weinberger
2019-03-20 23:25         ` Richard Weinberger
2019-03-20 23:36         ` Gustavo A. R. Silva
2019-03-20 23:36           ` Gustavo A. R. Silva
2019-04-10 21:16   ` Gustavo A. R. Silva
2019-04-10 21:16     ` Gustavo A. R. Silva
2019-04-15  8:44     ` Miquel Raynal
2019-04-15  8:44       ` Miquel Raynal
2019-04-15 12:57       ` Gustavo A. R. Silva
2019-04-15 12:57         ` Gustavo A. R. Silva
2019-04-16 17:24         ` Miquel Raynal
2019-04-16 17:24           ` Miquel Raynal
2019-04-16 20:49           ` Gustavo A. R. Silva
2019-04-16 20:49             ` Gustavo A. R. Silva
2019-05-07 14:54             ` Gustavo A. R. Silva
2019-05-07 14:54               ` Gustavo A. R. Silva
2019-05-07 15:49               ` Richard Weinberger [this message]
2019-05-07 15:49                 ` Richard Weinberger
2019-05-07 15:59                 ` Gustavo A. R. Silva
2019-05-07 15:59                   ` Gustavo A. R. Silva
2019-05-09  6:53                   ` Miquel Raynal
2019-05-09  6:53                     ` Miquel Raynal
2019-04-10 21:46 ` Kees Cook
2019-04-10 21:46   ` Kees Cook

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=785015370.48464.1557244145722.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=gustavo@embeddedor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    /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.