public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio:imu:adis: Mark expected switch fall-throughs
Date: Sat, 7 Jul 2018 18:01:35 +0100	[thread overview]
Message-ID: <20180707180135.01ac79e9@archlinux> (raw)
In-Reply-To: <20180703193550.GA12565@embeddedor.com>

On Tue, 3 Jul 2018 14:35:50 -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.
> 
> 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 hopefully ignore!

Thanks,

Jonathan

> ---
>  drivers/iio/imu/adis.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
> index ad6f91d..c771ae6 100644
> --- a/drivers/iio/imu/adis.c
> +++ b/drivers/iio/imu/adis.c
> @@ -81,9 +81,11 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
>  		adis->tx[9] = (value >> 24) & 0xff;
>  		adis->tx[6] = ADIS_WRITE_REG(reg + 2);
>  		adis->tx[7] = (value >> 16) & 0xff;
> +		/* fall through */
>  	case 2:
>  		adis->tx[4] = ADIS_WRITE_REG(reg + 1);
>  		adis->tx[5] = (value >> 8) & 0xff;
> +		/* fall through */
>  	case 1:
>  		adis->tx[2] = ADIS_WRITE_REG(reg);
>  		adis->tx[3] = value & 0xff;
> @@ -167,6 +169,7 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
>  		adis->tx[2] = ADIS_READ_REG(reg + 2);
>  		adis->tx[3] = 0;
>  		spi_message_add_tail(&xfers[1], &msg);
> +		/* fall through */
>  	case 2:
>  		adis->tx[4] = ADIS_READ_REG(reg);
>  		adis->tx[5] = 0;


      reply	other threads:[~2018-07-07 17:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03 19:35 [PATCH] iio:imu:adis: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-07-07 17:01 ` 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=20180707180135.01ac79e9@archlinux \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --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