diff mbox series

[050/141] RDMA/mlx5: Fix fall-through warnings for Clang

Message ID 2b0c87362bc86f6adfe56a5a6685837b71022bbf.1605896059.git.gustavoars@kernel.org (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series Fix fall-through warnings for Clang | expand

Commit Message

Gustavo A. R. Silva Nov. 20, 2020, 6:31 p.m. UTC
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding the new pseudo-keyword fallthrough; instead of
letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/infiniband/hw/mlx5/qp.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Leon Romanovsky Nov. 23, 2020, 8:33 a.m. UTC | #1
On Fri, Nov 20, 2020 at 12:31:49PM -0600, Gustavo A. R. Silva wrote:
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
> by explicitly adding the new pseudo-keyword fallthrough; instead of
> letting the code fall through to the next case.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
>  drivers/infiniband/hw/mlx5/qp.c | 1 +
>  1 file changed, 1 insertion(+)
>

Thanks,
Acked-by: Leon Romanovsky <leonro@nvidia.com>
Gustavo A. R. Silva Nov. 23, 2020, 10:50 p.m. UTC | #2
On Mon, Nov 23, 2020 at 10:33:32AM +0200, Leon Romanovsky wrote:
> On Fri, Nov 20, 2020 at 12:31:49PM -0600, Gustavo A. R. Silva wrote:
> > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
> > by explicitly adding the new pseudo-keyword fallthrough; instead of
> > letting the code fall through to the next case.
> >
> > Link: https://github.com/KSPP/linux/issues/115
> > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> > ---
> >  drivers/infiniband/hw/mlx5/qp.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> 
> Thanks,
> Acked-by: Leon Romanovsky <leonro@nvidia.com>

Thanks, Leon.
--
Gustavo
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 600e056798c0..ccaa4589331c 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2460,6 +2460,7 @@  static int check_qp_type(struct mlx5_ib_dev *dev, struct ib_qp_init_attr *attr,
 	case IB_QPT_GSI:
 		if (dev->profile == &raw_eth_profile)
 			goto out;
+		fallthrough;
 	case IB_QPT_RAW_PACKET:
 	case IB_QPT_UD:
 	case MLX5_IB_QPT_REG_UMR: