Commit c8b838d1 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Saeed Mahameed

net/mlx5: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-throughSigned-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent ffdc8ec0
...@@ -388,7 +388,7 @@ mlx5e_set_eseg_swp(struct sk_buff *skb, struct mlx5_wqe_eth_seg *eseg, ...@@ -388,7 +388,7 @@ mlx5e_set_eseg_swp(struct sk_buff *skb, struct mlx5_wqe_eth_seg *eseg,
switch (swp_spec->tun_l4_proto) { switch (swp_spec->tun_l4_proto) {
case IPPROTO_UDP: case IPPROTO_UDP:
eseg->swp_flags |= MLX5_ETH_WQE_SWP_INNER_L4_UDP; eseg->swp_flags |= MLX5_ETH_WQE_SWP_INNER_L4_UDP;
/* fall through */ fallthrough;
case IPPROTO_TCP: case IPPROTO_TCP:
eseg->swp_inner_l4_offset = skb_inner_transport_offset(skb) / 2; eseg->swp_inner_l4_offset = skb_inner_transport_offset(skb) / 2;
break; break;
......
...@@ -152,11 +152,11 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di, ...@@ -152,11 +152,11 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di,
return true; return true;
default: default:
bpf_warn_invalid_xdp_action(act); bpf_warn_invalid_xdp_action(act);
/* fall through */ fallthrough;
case XDP_ABORTED: case XDP_ABORTED:
xdp_abort: xdp_abort:
trace_xdp_exception(rq->netdev, prog, act); trace_xdp_exception(rq->netdev, prog, act);
/* fall through */ fallthrough;
case XDP_DROP: case XDP_DROP:
rq->stats->xdp_drop++; rq->stats->xdp_drop++;
return true; return true;
......
...@@ -470,7 +470,7 @@ bool mlx5e_ktls_handle_tx_skb(struct tls_context *tls_ctx, struct mlx5e_txqsq *s ...@@ -470,7 +470,7 @@ bool mlx5e_ktls_handle_tx_skb(struct tls_context *tls_ctx, struct mlx5e_txqsq *s
if (likely(!skb->decrypted)) if (likely(!skb->decrypted))
goto out; goto out;
WARN_ON_ONCE(1); WARN_ON_ONCE(1);
/* fall-through */ fallthrough;
case MLX5E_KTLS_SYNC_FAIL: case MLX5E_KTLS_SYNC_FAIL:
goto err_out; goto err_out;
} }
......
...@@ -243,7 +243,7 @@ int mlx5e_ethtool_get_sset_count(struct mlx5e_priv *priv, int sset) ...@@ -243,7 +243,7 @@ int mlx5e_ethtool_get_sset_count(struct mlx5e_priv *priv, int sset)
return MLX5E_NUM_PFLAGS; return MLX5E_NUM_PFLAGS;
case ETH_SS_TEST: case ETH_SS_TEST:
return mlx5e_self_test_num(priv); return mlx5e_self_test_num(priv);
/* fallthrough */ fallthrough;
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
...@@ -2346,7 +2346,7 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode, ...@@ -2346,7 +2346,7 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode,
case MLX5_CAP_INLINE_MODE_NOT_REQUIRED: case MLX5_CAP_INLINE_MODE_NOT_REQUIRED:
if (mode == DEVLINK_ESWITCH_INLINE_MODE_NONE) if (mode == DEVLINK_ESWITCH_INLINE_MODE_NONE)
goto out; goto out;
/* fall through */ fallthrough;
case MLX5_CAP_INLINE_MODE_L2: case MLX5_CAP_INLINE_MODE_L2:
NL_SET_ERR_MSG_MOD(extack, "Inline mode can't be set"); NL_SET_ERR_MSG_MOD(extack, "Inline mode can't be set");
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
......
...@@ -339,14 +339,14 @@ static void mlx5_fpga_conn_handle_cqe(struct mlx5_fpga_conn *conn, ...@@ -339,14 +339,14 @@ static void mlx5_fpga_conn_handle_cqe(struct mlx5_fpga_conn *conn,
switch (opcode) { switch (opcode) {
case MLX5_CQE_REQ_ERR: case MLX5_CQE_REQ_ERR:
status = ((struct mlx5_err_cqe *)cqe)->syndrome; status = ((struct mlx5_err_cqe *)cqe)->syndrome;
/* Fall through */ fallthrough;
case MLX5_CQE_REQ: case MLX5_CQE_REQ:
mlx5_fpga_conn_sq_cqe(conn, cqe, status); mlx5_fpga_conn_sq_cqe(conn, cqe, status);
break; break;
case MLX5_CQE_RESP_ERR: case MLX5_CQE_RESP_ERR:
status = ((struct mlx5_err_cqe *)cqe)->syndrome; status = ((struct mlx5_err_cqe *)cqe)->syndrome;
/* Fall through */ fallthrough;
case MLX5_CQE_RESP_SEND: case MLX5_CQE_RESP_SEND:
mlx5_fpga_conn_rq_cqe(conn, cqe, status); mlx5_fpga_conn_rq_cqe(conn, cqe, status);
break; break;
......
...@@ -198,13 +198,13 @@ static void mlx5_lag_fib_update(struct work_struct *work) ...@@ -198,13 +198,13 @@ static void mlx5_lag_fib_update(struct work_struct *work)
/* Protect internal structures from changes */ /* Protect internal structures from changes */
rtnl_lock(); rtnl_lock();
switch (fib_work->event) { switch (fib_work->event) {
case FIB_EVENT_ENTRY_REPLACE: /* fall through */ case FIB_EVENT_ENTRY_REPLACE:
case FIB_EVENT_ENTRY_DEL: case FIB_EVENT_ENTRY_DEL:
mlx5_lag_fib_route_event(ldev, fib_work->event, mlx5_lag_fib_route_event(ldev, fib_work->event,
fib_work->fen_info.fi); fib_work->fen_info.fi);
fib_info_put(fib_work->fen_info.fi); fib_info_put(fib_work->fen_info.fi);
break; break;
case FIB_EVENT_NH_ADD: /* fall through */ case FIB_EVENT_NH_ADD:
case FIB_EVENT_NH_DEL: case FIB_EVENT_NH_DEL:
fib_nh = fib_work->fnh_info.fib_nh; fib_nh = fib_work->fnh_info.fib_nh;
mlx5_lag_fib_nexthop_event(ldev, mlx5_lag_fib_nexthop_event(ldev,
...@@ -255,7 +255,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb, ...@@ -255,7 +255,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
return NOTIFY_DONE; return NOTIFY_DONE;
switch (event) { switch (event) {
case FIB_EVENT_ENTRY_REPLACE: /* fall through */ case FIB_EVENT_ENTRY_REPLACE:
case FIB_EVENT_ENTRY_DEL: case FIB_EVENT_ENTRY_DEL:
fen_info = container_of(info, struct fib_entry_notifier_info, fen_info = container_of(info, struct fib_entry_notifier_info,
info); info);
...@@ -278,7 +278,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb, ...@@ -278,7 +278,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
*/ */
fib_info_hold(fib_work->fen_info.fi); fib_info_hold(fib_work->fen_info.fi);
break; break;
case FIB_EVENT_NH_ADD: /* fall through */ case FIB_EVENT_NH_ADD:
case FIB_EVENT_NH_DEL: case FIB_EVENT_NH_DEL:
fnh_info = container_of(info, struct fib_nh_notifier_info, fnh_info = container_of(info, struct fib_nh_notifier_info,
info); info);
......
...@@ -110,7 +110,7 @@ void mlx5_query_min_inline(struct mlx5_core_dev *mdev, ...@@ -110,7 +110,7 @@ void mlx5_query_min_inline(struct mlx5_core_dev *mdev,
case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT: case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT:
if (!mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode)) if (!mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode))
break; break;
/* fall through */ fallthrough;
case MLX5_CAP_INLINE_MODE_L2: case MLX5_CAP_INLINE_MODE_L2:
*min_inline_mode = MLX5_INLINE_MODE_L2; *min_inline_mode = MLX5_INLINE_MODE_L2;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment