bnx2x: Mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Thu, 28 Jun 2018 01:32:23 +0000 (20:32 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 09:43:13 +0000 (18:43 +0900)
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>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 22243c480a05341238850e71b9bd196bc705a064..98d4c5a3ff21171257765c0eda4333f0a8484143 100644 (file)
@@ -6339,6 +6339,7 @@ int bnx2x_set_led(struct link_params *params,
                 */
                if (!vars->link_up)
                        break;
+               /* else: fall through */
        case LED_MODE_ON:
                if (((params->phy[EXT_PHY1].type ==
                          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) {
        case PORT_FEATURE_LINK_SPEED_10M_HALF:
                phy->req_duplex = DUPLEX_HALF;
+               /* fall through */
        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 */
        case PORT_FEATURE_LINK_SPEED_100M_FULL:
                phy->req_line_speed = SPEED_100;
                break;
index 5b1ed240bf18be0963cc580ab4256b6adc924046..44a6f2802babc8a7cc1231ba40aa8b6683068d1f 100644 (file)
@@ -8561,11 +8561,11 @@ int bnx2x_set_int_mode(struct bnx2x *bp)
                               bp->num_queues,
                               1 + bp->num_cnic_queues);
 
-               /* falling through... */
+               /* fall through */
        case BNX2X_INT_MODE_MSI:
                bnx2x_enable_msi(bp);
 
-               /* falling through... */
+               /* fall through */
        case BNX2X_INT_MODE_INTX:
                bp->num_ethernet_queues = 1;
                bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues;
index 8baf9d3eb4b1c1a1dd84abe031b7c19c8dbb7370..3f4d2c8da21a3a848b4149758883333522b6f77a 100644 (file)
@@ -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);
-               /* Don't break */
+               /* fall through */
 
        /* 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);
-               /* Don't break */
+               /* fall through */
 
        /* RESTORE command will restore the entire multicast configuration */
        case BNX2X_MCAST_CMD_RESTORE:
index dc77bfded8652d7d200a123838cf8e07b5201ff8..62da465377340249af3e7e0671f7802272ba410a 100644 (file)
@@ -1827,6 +1827,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 */
        case EVENT_RING_OPCODE_VF_FLR:
                /* Do nothing for now */
                return 0;
index b5fc6414a951300ad7021e47d060dba54ea7e619..d2dadade1d0e3e2afc48b6130dbad8a2a0e63b05 100644 (file)
@@ -1727,7 +1727,7 @@ static int bnxt_async_event_process(struct bnxt *bp,
                                            speed);
                }
                set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
-               /* fall thru */
+               /* fall through */
        }
        case ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
                set_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event);