Skip to content

Commit c8b838d

Browse files
GustavoARSilvaSaeed Mahameed
authored andcommitted
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-through Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent ffdc8ec commit c8b838d

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ mlx5e_set_eseg_swp(struct sk_buff *skb, struct mlx5_wqe_eth_seg *eseg,
388388
switch (swp_spec->tun_l4_proto) {
389389
case IPPROTO_UDP:
390390
eseg->swp_flags |= MLX5_ETH_WQE_SWP_INNER_L4_UDP;
391-
/* fall through */
391+
fallthrough;
392392
case IPPROTO_TCP:
393393
eseg->swp_inner_l4_offset = skb_inner_transport_offset(skb) / 2;
394394
break;

drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di,
152152
return true;
153153
default:
154154
bpf_warn_invalid_xdp_action(act);
155-
/* fall through */
155+
fallthrough;
156156
case XDP_ABORTED:
157157
xdp_abort:
158158
trace_xdp_exception(rq->netdev, prog, act);
159-
/* fall through */
159+
fallthrough;
160160
case XDP_DROP:
161161
rq->stats->xdp_drop++;
162162
return true;

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ bool mlx5e_ktls_handle_tx_skb(struct tls_context *tls_ctx, struct mlx5e_txqsq *s
470470
if (likely(!skb->decrypted))
471471
goto out;
472472
WARN_ON_ONCE(1);
473-
/* fall-through */
473+
fallthrough;
474474
case MLX5E_KTLS_SYNC_FAIL:
475475
goto err_out;
476476
}

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ int mlx5e_ethtool_get_sset_count(struct mlx5e_priv *priv, int sset)
243243
return MLX5E_NUM_PFLAGS;
244244
case ETH_SS_TEST:
245245
return mlx5e_self_test_num(priv);
246-
/* fallthrough */
246+
fallthrough;
247247
default:
248248
return -EOPNOTSUPP;
249249
}

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2346,7 +2346,7 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode,
23462346
case MLX5_CAP_INLINE_MODE_NOT_REQUIRED:
23472347
if (mode == DEVLINK_ESWITCH_INLINE_MODE_NONE)
23482348
goto out;
2349-
/* fall through */
2349+
fallthrough;
23502350
case MLX5_CAP_INLINE_MODE_L2:
23512351
NL_SET_ERR_MSG_MOD(extack, "Inline mode can't be set");
23522352
err = -EOPNOTSUPP;

drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,14 @@ static void mlx5_fpga_conn_handle_cqe(struct mlx5_fpga_conn *conn,
339339
switch (opcode) {
340340
case MLX5_CQE_REQ_ERR:
341341
status = ((struct mlx5_err_cqe *)cqe)->syndrome;
342-
/* Fall through */
342+
fallthrough;
343343
case MLX5_CQE_REQ:
344344
mlx5_fpga_conn_sq_cqe(conn, cqe, status);
345345
break;
346346

347347
case MLX5_CQE_RESP_ERR:
348348
status = ((struct mlx5_err_cqe *)cqe)->syndrome;
349-
/* Fall through */
349+
fallthrough;
350350
case MLX5_CQE_RESP_SEND:
351351
mlx5_fpga_conn_rq_cqe(conn, cqe, status);
352352
break;

drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,13 @@ static void mlx5_lag_fib_update(struct work_struct *work)
198198
/* Protect internal structures from changes */
199199
rtnl_lock();
200200
switch (fib_work->event) {
201-
case FIB_EVENT_ENTRY_REPLACE: /* fall through */
201+
case FIB_EVENT_ENTRY_REPLACE:
202202
case FIB_EVENT_ENTRY_DEL:
203203
mlx5_lag_fib_route_event(ldev, fib_work->event,
204204
fib_work->fen_info.fi);
205205
fib_info_put(fib_work->fen_info.fi);
206206
break;
207-
case FIB_EVENT_NH_ADD: /* fall through */
207+
case FIB_EVENT_NH_ADD:
208208
case FIB_EVENT_NH_DEL:
209209
fib_nh = fib_work->fnh_info.fib_nh;
210210
mlx5_lag_fib_nexthop_event(ldev,
@@ -255,7 +255,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
255255
return NOTIFY_DONE;
256256

257257
switch (event) {
258-
case FIB_EVENT_ENTRY_REPLACE: /* fall through */
258+
case FIB_EVENT_ENTRY_REPLACE:
259259
case FIB_EVENT_ENTRY_DEL:
260260
fen_info = container_of(info, struct fib_entry_notifier_info,
261261
info);
@@ -278,7 +278,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
278278
*/
279279
fib_info_hold(fib_work->fen_info.fi);
280280
break;
281-
case FIB_EVENT_NH_ADD: /* fall through */
281+
case FIB_EVENT_NH_ADD:
282282
case FIB_EVENT_NH_DEL:
283283
fnh_info = container_of(info, struct fib_nh_notifier_info,
284284
info);

drivers/net/ethernet/mellanox/mlx5/core/vport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void mlx5_query_min_inline(struct mlx5_core_dev *mdev,
110110
case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT:
111111
if (!mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode))
112112
break;
113-
/* fall through */
113+
fallthrough;
114114
case MLX5_CAP_INLINE_MODE_L2:
115115
*min_inline_mode = MLX5_INLINE_MODE_L2;
116116
break;

0 commit comments

Comments
 (0)