treewide: 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 <gustavoars@kernel.org>
This commit is contained in:
@@ -4712,14 +4712,14 @@ static void bnx2x_sync_link(struct link_params *params,
|
||||
LINK_STATUS_SPEED_AND_DUPLEX_MASK) {
|
||||
case LINK_10THD:
|
||||
vars->duplex = DUPLEX_HALF;
|
||||
/* Fall thru */
|
||||
fallthrough;
|
||||
case LINK_10TFD:
|
||||
vars->line_speed = SPEED_10;
|
||||
break;
|
||||
|
||||
case LINK_100TXHD:
|
||||
vars->duplex = DUPLEX_HALF;
|
||||
/* Fall thru */
|
||||
fallthrough;
|
||||
case LINK_100T4:
|
||||
case LINK_100TXFD:
|
||||
vars->line_speed = SPEED_100;
|
||||
@@ -4727,14 +4727,14 @@ static void bnx2x_sync_link(struct link_params *params,
|
||||
|
||||
case LINK_1000THD:
|
||||
vars->duplex = DUPLEX_HALF;
|
||||
/* Fall thru */
|
||||
fallthrough;
|
||||
case LINK_1000TFD:
|
||||
vars->line_speed = SPEED_1000;
|
||||
break;
|
||||
|
||||
case LINK_2500THD:
|
||||
vars->duplex = DUPLEX_HALF;
|
||||
/* Fall thru */
|
||||
fallthrough;
|
||||
case LINK_2500TFD:
|
||||
vars->line_speed = SPEED_2500;
|
||||
break;
|
||||
@@ -6339,7 +6339,7 @@ int bnx2x_set_led(struct link_params *params,
|
||||
*/
|
||||
if (!vars->link_up)
|
||||
break;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case LED_MODE_ON:
|
||||
if (((params->phy[EXT_PHY1].type ==
|
||||
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727) ||
|
||||
@@ -12508,13 +12508,13 @@ static void bnx2x_phy_def_cfg(struct link_params *params,
|
||||
switch (link_config & PORT_FEATURE_LINK_SPEED_MASK) {
|
||||
case PORT_FEATURE_LINK_SPEED_10M_HALF:
|
||||
phy->req_duplex = DUPLEX_HALF;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case PORT_FEATURE_LINK_SPEED_10M_FULL:
|
||||
phy->req_line_speed = SPEED_10;
|
||||
break;
|
||||
case PORT_FEATURE_LINK_SPEED_100M_HALF:
|
||||
phy->req_duplex = DUPLEX_HALF;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case PORT_FEATURE_LINK_SPEED_100M_FULL:
|
||||
phy->req_line_speed = SPEED_100;
|
||||
break;
|
||||
|
||||
@@ -8600,11 +8600,11 @@ int bnx2x_set_int_mode(struct bnx2x *bp)
|
||||
bp->num_queues,
|
||||
1 + bp->num_cnic_queues);
|
||||
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case BNX2X_INT_MODE_MSI:
|
||||
bnx2x_enable_msi(bp);
|
||||
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case BNX2X_INT_MODE_INTX:
|
||||
bp->num_ethernet_queues = 1;
|
||||
bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues;
|
||||
|
||||
@@ -3258,7 +3258,7 @@ static int bnx2x_mcast_validate_e2(struct bnx2x *bp,
|
||||
/* DEL command deletes all currently configured MACs */
|
||||
case BNX2X_MCAST_CMD_DEL:
|
||||
o->set_registry_size(o, 0);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
|
||||
/* RESTORE command will restore the entire multicast configuration */
|
||||
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 */
|
||||
case BNX2X_MCAST_CMD_DEL:
|
||||
o->set_registry_size(o, 0);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
|
||||
/* RESTORE command will restore the entire multicast configuration */
|
||||
case BNX2X_MCAST_CMD_RESTORE:
|
||||
|
||||
@@ -1809,7 +1809,7 @@ get_vf:
|
||||
DP(BNX2X_MSG_IOV, "got VF [%d:%d] RSS update ramrod\n",
|
||||
vf->abs_vfid, qidx);
|
||||
bnx2x_vf_handle_rss_update_eqe(bp, vf);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case EVENT_RING_OPCODE_VF_FLR:
|
||||
/* Do nothing for now */
|
||||
return 0;
|
||||
@@ -2207,7 +2207,7 @@ int bnx2x_vf_free(struct bnx2x *bp, struct bnx2x_virtf *vf)
|
||||
rc = bnx2x_vf_close(bp, vf);
|
||||
if (rc)
|
||||
goto op_err;
|
||||
/* Fall through - to release resources */
|
||||
fallthrough; /* to release resources */
|
||||
case VF_ACQUIRED:
|
||||
DP(BNX2X_MSG_IOV, "about to free resources\n");
|
||||
bnx2x_vf_free_resc(bp, vf);
|
||||
|
||||
Reference in New Issue
Block a user