From: Kees Cook <keescook@chromium.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pcmcia: db1xxx_ss: Mark expected switch fall-throughs
Date: Mon, 5 Aug 2019 13:18:56 -0700 [thread overview]
Message-ID: <201908051318.0884AE3F@keescook> (raw)
In-Reply-To: <20190805194942.GA15816@embeddedor>
On Mon, Aug 05, 2019 at 02:49:42PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warnings (Building: db1xxx_defconfig mips):
>
> drivers/pcmcia/db1xxx_ss.c:257:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> drivers/pcmcia/db1xxx_ss.c:269:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> drivers/pcmcia/db1xxx_ss.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c
> index eb6168e6ac43..590e594092f2 100644
> --- a/drivers/pcmcia/db1xxx_ss.c
> +++ b/drivers/pcmcia/db1xxx_ss.c
> @@ -255,8 +255,10 @@ static int db1x_pcmcia_configure(struct pcmcia_socket *skt,
> switch (state->Vcc) {
> case 50:
> ++v;
> + /* fall through */
> case 33:
> ++v;
> + /* fall through */
> case 0:
> break;
> default:
> @@ -267,9 +269,11 @@ static int db1x_pcmcia_configure(struct pcmcia_socket *skt,
> switch (state->Vpp) {
> case 12:
> ++p;
> + /* fall through */
> case 33:
> case 50:
> ++p;
> + /* fall through */
> case 0:
> break;
> default:
> --
> 2.22.0
>
--
Kees Cook
prev parent reply other threads:[~2019-08-05 20:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 19:49 [PATCH] pcmcia: db1xxx_ss: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-08-05 20:18 ` Kees Cook [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=201908051318.0884AE3F@keescook \
--to=keescook@chromium.org \
--cc=gustavo@embeddedor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
/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.