Skip to content

Commit 482dcf7

Browse files
GustavoARSilvadavem330
authored andcommitted
net/mlx4: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/mellanox/mlx4/eq.c: In function ‘mlx4_eq_int’: drivers/net/ethernet/mellanox/mlx4/mlx4.h:219:5: warning: this statement may fall through [-Wimplicit-fallthrough=] if (mlx4_debug_level) \ ^ drivers/net/ethernet/mellanox/mlx4/eq.c:558:4: note: in expansion of macro ‘mlx4_dbg’ mlx4_dbg(dev, "%s: MLX4_EVENT_TYPE_SRQ_LIMIT. srq_no=0x%x, eq 0x%x\n", ^~~~~~~~ drivers/net/ethernet/mellanox/mlx4/eq.c:561:3: note: here case MLX4_EVENT_TYPE_SRQ_CATAS_ERROR: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ed35da4 commit 482dcf7

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+1
-0
lines changed

drivers/net/ethernet/mellanox/mlx4/eq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ static int mlx4_eq_int(struct mlx4_dev *dev, struct mlx4_eq *eq)
558558
mlx4_dbg(dev, "%s: MLX4_EVENT_TYPE_SRQ_LIMIT. srq_no=0x%x, eq 0x%x\n",
559559
__func__, be32_to_cpu(eqe->event.srq.srqn),
560560
eq->eqn);
561+
/* fall through */
561562
case MLX4_EVENT_TYPE_SRQ_CATAS_ERROR:
562563
if (mlx4_is_master(dev)) {
563564
/* forward only to slave owning the SRQ */

0 commit comments

Comments
 (0)