public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Kent Overstreet <kent.overstreet@gmail.com>,
	linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2][next] bcache: Use fallthrough pseudo-keyword
Date: Tue, 28 Jul 2020 20:48:36 +0800	[thread overview]
Message-ID: <9c8fa79f-a34a-1e3d-10ed-819bb05e8b30@suse.de> (raw)
In-Reply-To: <20200727230418.GA14028@embeddedor>

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

I am OK with it, add it to my second for-next series.

Thanks.

Coly Li


> ---
> Changes in v2:
>  - Add missing semicolon.
> 
>  drivers/md/bcache/journal.c |  2 +-
>  drivers/md/bcache/util.c    | 14 +++++++-------
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
> index 77fbfd52edcf..c1227bdb57e7 100644
> --- a/drivers/md/bcache/journal.c
> +++ b/drivers/md/bcache/journal.c
> @@ -608,7 +608,7 @@ static void do_journal_discard(struct cache *ca)
>  			ca->sb.njournal_buckets;
>  
>  		atomic_set(&ja->discard_in_flight, DISCARD_READY);
> -		/* fallthrough */
> +		fallthrough;
>  
>  	case DISCARD_READY:
>  		if (ja->discard_idx == ja->last_idx)
> diff --git a/drivers/md/bcache/util.c b/drivers/md/bcache/util.c
> index 62fb917f7a4f..ae380bc3992e 100644
> --- a/drivers/md/bcache/util.c
> +++ b/drivers/md/bcache/util.c
> @@ -33,27 +33,27 @@ int bch_ ## name ## _h(const char *cp, type *res)		\
>  	case 'y':						\
>  	case 'z':						\
>  		u++;						\
> -		/* fall through */				\
> +		fallthrough;					\
>  	case 'e':						\
>  		u++;						\
> -		/* fall through */				\
> +		fallthrough;					\
>  	case 'p':						\
>  		u++;						\
> -		/* fall through */				\
> +		fallthrough;					\
>  	case 't':						\
>  		u++;						\
> -		/* fall through */				\
> +		fallthrough;					\
>  	case 'g':						\
>  		u++;						\
> -		/* fall through */				\
> +		fallthrough;					\
>  	case 'm':						\
>  		u++;						\
> -		/* fall through */				\
> +		fallthrough;					\
>  	case 'k':						\
>  		u++;						\
>  		if (e++ == cp)					\
>  			return -EINVAL;				\
> -		/* fall through */				\
> +		fallthrough;					\
>  	case '\n':						\
>  	case '\0':						\
>  		if (*e == '\n')					\
> 


      reply	other threads:[~2020-07-28 12:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 23:04 [PATCH v2][next] bcache: Use fallthrough pseudo-keyword Gustavo A. R. Silva
2020-07-28 12:48 ` Coly Li [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=9c8fa79f-a34a-1e3d-10ed-819bb05e8b30@suse.de \
    --to=colyli@suse.de \
    --cc=gustavoars@kernel.org \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-bcache@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