linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: Re: [PATCH][next] i2c: mv64xxx: Use fallthrough pseudo-keyword
Date: Fri, 17 Jul 2020 08:44:10 +0200	[thread overview]
Message-ID: <878sfi4p51.fsf@FE-laptop> (raw)
In-Reply-To: <20200716215431.GA19300@embeddedor>

"Gustavo A. R. Silva" <gustavoars@kernel.org> writes:

> Replace the existing /* fall through */ comments and its variants with
> the new pseudo-keyword macro fallthrough[1].
>
> [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>

> ---
>  drivers/i2c/busses/i2c-mv64xxx.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
> index 829b8c98ae51..8d9d4ffdcd24 100644
> --- a/drivers/i2c/busses/i2c-mv64xxx.c
> +++ b/drivers/i2c/busses/i2c-mv64xxx.c
> @@ -251,7 +251,7 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)
>  				MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK;
>  			break;
>  		}
> -		/* FALLTHRU */
> +		fallthrough;
>  	case MV64XXX_I2C_STATUS_MAST_WR_ADDR_2_ACK: /* 0xd0 */
>  	case MV64XXX_I2C_STATUS_MAST_WR_ACK: /* 0x28 */
>  		if ((drv_data->bytes_left == 0)
> @@ -282,14 +282,14 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)
>  				MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK;
>  			break;
>  		}
> -		/* FALLTHRU */
> +		fallthrough;
>  	case MV64XXX_I2C_STATUS_MAST_RD_ADDR_2_ACK: /* 0xe0 */
>  		if (drv_data->bytes_left == 0) {
>  			drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP;
>  			drv_data->state = MV64XXX_I2C_STATE_IDLE;
>  			break;
>  		}
> -		/* FALLTHRU */
> +		fallthrough;
>  	case MV64XXX_I2C_STATUS_MAST_RD_DATA_ACK: /* 0x50 */
>  		if (status != MV64XXX_I2C_STATUS_MAST_RD_DATA_ACK)
>  			drv_data->action = MV64XXX_I2C_ACTION_CONTINUE;
> @@ -417,8 +417,7 @@ mv64xxx_i2c_do_action(struct mv64xxx_i2c_data *drv_data)
>  			"mv64xxx_i2c_do_action: Invalid action: %d\n",
>  			drv_data->action);
>  		drv_data->rc = -EIO;
> -
> -		/* FALLTHRU */
> +		fallthrough;
>  	case MV64XXX_I2C_ACTION_SEND_STOP:
>  		drv_data->cntl_bits &= ~MV64XXX_I2C_REG_CONTROL_INTEN;
>  		writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP,
> -- 
> 2.27.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

      reply	other threads:[~2020-07-17  6:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 21:54 [PATCH][next] i2c: mv64xxx: Use fallthrough pseudo-keyword Gustavo A. R. Silva
2020-07-17  6:44 ` Gregory CLEMENT [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=878sfi4p51.fsf@FE-laptop \
    --to=gregory.clement@bootlin.com \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).