From: Jonathan Cameron <jic23@kernel.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: health: max30102: Mark expected switch fall-throughs
Date: Sun, 19 Aug 2018 17:22:04 +0100 [thread overview]
Message-ID: <20180819172204.29754098@archlinux> (raw)
In-Reply-To: <20180815162349.GA3458@embeddedor.com>
On Wed, 15 Aug 2018 11:23:49 -0500
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in this particular case, I placed the "fall through"
> annotation at the bottom of the case, which is what GCC is expecting
> to find.
>
> Addresses-Coverity-ID: 1458342 ("Missing break in switch")
> Addresses-Coverity-ID: 1458345 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/health/max30102.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
> index 15ccadc..3e29562 100644
> --- a/drivers/iio/health/max30102.c
> +++ b/drivers/iio/health/max30102.c
> @@ -282,9 +282,11 @@ static int max30102_read_measurement(struct max30102_data *data,
> switch (measurements) {
> case 3:
> MAX30102_COPY_DATA(2);
> - case 2: /* fall-through */
> + /* fall through */
> + case 2:
> MAX30102_COPY_DATA(1);
> - case 1: /* fall-through */
> + /* fall through */
> + case 1:
> MAX30102_COPY_DATA(0);
> break;
> default:
prev parent reply other threads:[~2018-08-19 19:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 16:23 [PATCH] iio: health: max30102: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-19 16:22 ` Jonathan Cameron [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=20180819172204.29754098@archlinux \
--to=jic23@kernel.org \
--cc=gustavo@embeddedor.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).