bnx2x: Mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Gustavo A. R. Silva 2018-06-27 20:32:23 -05:00 committed by David S. Miller
parent 1f705bc61a
commit 83607344d6
5 changed files with 9 additions and 5 deletions

View File

@ -6339,6 +6339,7 @@ int bnx2x_set_led(struct link_params *params,
*/ */
if (!vars->link_up) if (!vars->link_up)
break; break;
/* else: fall through */
case LED_MODE_ON: case LED_MODE_ON:
if (((params->phy[EXT_PHY1].type == if (((params->phy[EXT_PHY1].type ==
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727) || PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727) ||
@ -12521,11 +12522,13 @@ static void bnx2x_phy_def_cfg(struct link_params *params,
switch (link_config & PORT_FEATURE_LINK_SPEED_MASK) { switch (link_config & PORT_FEATURE_LINK_SPEED_MASK) {
case PORT_FEATURE_LINK_SPEED_10M_HALF: case PORT_FEATURE_LINK_SPEED_10M_HALF:
phy->req_duplex = DUPLEX_HALF; phy->req_duplex = DUPLEX_HALF;
/* fall through */
case PORT_FEATURE_LINK_SPEED_10M_FULL: case PORT_FEATURE_LINK_SPEED_10M_FULL:
phy->req_line_speed = SPEED_10; phy->req_line_speed = SPEED_10;
break; break;
case PORT_FEATURE_LINK_SPEED_100M_HALF: case PORT_FEATURE_LINK_SPEED_100M_HALF:
phy->req_duplex = DUPLEX_HALF; phy->req_duplex = DUPLEX_HALF;
/* fall through */
case PORT_FEATURE_LINK_SPEED_100M_FULL: case PORT_FEATURE_LINK_SPEED_100M_FULL:
phy->req_line_speed = SPEED_100; phy->req_line_speed = SPEED_100;
break; break;

View File

@ -8561,11 +8561,11 @@ int bnx2x_set_int_mode(struct bnx2x *bp)
bp->num_queues, bp->num_queues,
1 + bp->num_cnic_queues); 1 + bp->num_cnic_queues);
/* falling through... */ /* fall through */
case BNX2X_INT_MODE_MSI: case BNX2X_INT_MODE_MSI:
bnx2x_enable_msi(bp); bnx2x_enable_msi(bp);
/* falling through... */ /* fall through */
case BNX2X_INT_MODE_INTX: case BNX2X_INT_MODE_INTX:
bp->num_ethernet_queues = 1; bp->num_ethernet_queues = 1;
bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues; bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues;

View File

@ -3258,7 +3258,7 @@ static int bnx2x_mcast_validate_e2(struct bnx2x *bp,
/* DEL command deletes all currently configured MACs */ /* DEL command deletes all currently configured MACs */
case BNX2X_MCAST_CMD_DEL: case BNX2X_MCAST_CMD_DEL:
o->set_registry_size(o, 0); o->set_registry_size(o, 0);
/* Don't break */ /* fall through */
/* RESTORE command will restore the entire multicast configuration */ /* RESTORE command will restore the entire multicast configuration */
case BNX2X_MCAST_CMD_RESTORE: case BNX2X_MCAST_CMD_RESTORE:
@ -3592,7 +3592,7 @@ static int bnx2x_mcast_validate_e1(struct bnx2x *bp,
/* DEL command deletes all currently configured MACs */ /* DEL command deletes all currently configured MACs */
case BNX2X_MCAST_CMD_DEL: case BNX2X_MCAST_CMD_DEL:
o->set_registry_size(o, 0); o->set_registry_size(o, 0);
/* Don't break */ /* fall through */
/* RESTORE command will restore the entire multicast configuration */ /* RESTORE command will restore the entire multicast configuration */
case BNX2X_MCAST_CMD_RESTORE: case BNX2X_MCAST_CMD_RESTORE:

View File

@ -1827,6 +1827,7 @@ get_vf:
DP(BNX2X_MSG_IOV, "got VF [%d:%d] RSS update ramrod\n", DP(BNX2X_MSG_IOV, "got VF [%d:%d] RSS update ramrod\n",
vf->abs_vfid, qidx); vf->abs_vfid, qidx);
bnx2x_vf_handle_rss_update_eqe(bp, vf); bnx2x_vf_handle_rss_update_eqe(bp, vf);
/* fall through */
case EVENT_RING_OPCODE_VF_FLR: case EVENT_RING_OPCODE_VF_FLR:
/* Do nothing for now */ /* Do nothing for now */
return 0; return 0;

View File

@ -1727,7 +1727,7 @@ static int bnxt_async_event_process(struct bnxt *bp,
speed); speed);
} }
set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event); set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
/* fall thru */ /* fall through */
} }
case ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE: case ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
set_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event); set_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event);