linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Wei Ming Chen <jj251510319013@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] i40iw: Use fallthrough pseudo-keyword
Date: Sun, 9 May 2021 13:50:04 +0300	[thread overview]
Message-ID: <YJe+XDO5PEr4SF0l@unreal> (raw)
In-Reply-To: <20210509083135.14575-1-jj251510319013@gmail.com>

On Sun, May 09, 2021 at 04:31:35PM +0800, Wei Ming Chen wrote:
> Add 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: Wei Ming Chen <jj251510319013@gmail.com>
> ---
>  drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 1 +
>  drivers/infiniband/hw/i40iw/i40iw_uk.c   | 1 +
>  2 files changed, 2 insertions(+)

What exactly are you fixing?
"case" without any code doesn't need "fallthrough".

Thanks

> 
> diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> index eaea5d545eb8..c6081283217c 100644
> --- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> +++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
> @@ -2454,6 +2454,7 @@ static enum i40iw_status_code i40iw_sc_qp_init(struct i40iw_sc_qp *qp,
>  			return ret_code;
>  		break;
>  	case 5: /* fallthrough until next ABI version */
> +		fallthrough;
>  	default:
>  		if (qp->qp_uk.max_rq_frag_cnt > I40IW_MAX_WQ_FRAGMENT_COUNT)
>  			return I40IW_ERR_INVALID_FRAG_COUNT;
> diff --git a/drivers/infiniband/hw/i40iw/i40iw_uk.c b/drivers/infiniband/hw/i40iw/i40iw_uk.c
> index f521be16bf31..e1c318c291c0 100644
> --- a/drivers/infiniband/hw/i40iw/i40iw_uk.c
> +++ b/drivers/infiniband/hw/i40iw/i40iw_uk.c
> @@ -1004,6 +1004,7 @@ enum i40iw_status_code i40iw_qp_uk_init(struct i40iw_qp_uk *qp,
>  			i40iw_get_wqe_shift(info->max_rq_frag_cnt, 0, &rqshift);
>  			break;
>  		case 5: /* fallthrough until next ABI version */
> +			fallthrough;
>  		default:
>  			rqshift = I40IW_MAX_RQ_WQE_SHIFT;
>  			break;
> -- 
> 2.25.1
> 

  reply	other threads:[~2021-05-09 10:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09  8:31 [PATCH] i40iw: Use fallthrough pseudo-keyword Wei Ming Chen
2021-05-09 10:50 ` Leon Romanovsky [this message]
     [not found]   ` <CAJwFiGLyH5aOY=MGvCawWBm7fXuPkndBO83jkT9dWhPpnrd+cw@mail.gmail.com>
2021-05-09 12:22     ` Leon Romanovsky
     [not found]       ` <CAJwFiGK-ABAuNGcFbXAr6d6bn10_t8O+3h09Xt15WGh-7G1W3A@mail.gmail.com>
2021-05-09 14:15         ` Leon Romanovsky

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=YJe+XDO5PEr4SF0l@unreal \
    --to=leon@kernel.org \
    --cc=jj251510319013@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@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).