]> git.droids-corp.org - dpdk.git/commitdiff
net/e1000/base: fall through explicitly
authorGuinan Sun <guinanx.sun@intel.com>
Mon, 6 Jul 2020 08:12:01 +0000 (08:12 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 7 Jul 2020 21:38:27 +0000 (23:38 +0200)
Found some inconsistent code comments when it came to when we "fall
through", so made them more consistent and non-repetitive.

This patch adds/changes fall through comments to address new warnings
produced by gcc 7.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
drivers/net/e1000/base/e1000_82575.c
drivers/net/e1000/base/e1000_mbx.c
drivers/net/e1000/base/e1000_phy.c
drivers/net/e1000/base/e1000_vf.c

index 8db287251d068d5c33ac0f008dc5c83e7d29f5c2..7c562258a4bc1171dce6d8a0ecf2737dce78b8fb 100644 (file)
@@ -1560,14 +1560,21 @@ STATIC s32 e1000_setup_copper_link_82575(struct e1000_hw *hw)
        }
        switch (hw->phy.type) {
        case e1000_phy_i210:
+       /* Fall through */
        case e1000_phy_m88:
                switch (hw->phy.id) {
                case I347AT4_E_PHY_ID:
+               /* Fall through */
                case M88E1112_E_PHY_ID:
+               /* Fall through */
                case M88E1340M_E_PHY_ID:
+               /* Fall through */
                case M88E1543_E_PHY_ID:
+               /* Fall through */
                case M88E1512_E_PHY_ID:
+               /* Fall through */
                case I210_I_PHY_ID:
+               /* Fall through */
                        ret_val = e1000_copper_link_setup_m88_gen2(hw);
                        break;
                default:
@@ -1653,7 +1660,7 @@ STATIC s32 e1000_setup_serdes_link_82575(struct e1000_hw *hw)
        case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX:
                /* disable PCS autoneg and support parallel detect only */
                pcs_autoneg = false;
-               /* fall through to default case */
+               /* Fall through */
        default:
                if (hw->mac.type == e1000_82575 ||
                    hw->mac.type == e1000_82576) {
@@ -1779,7 +1786,7 @@ STATIC s32 e1000_get_media_type_82575(struct e1000_hw *hw)
                        dev_spec->sgmii_active = true;
                        break;
                }
-               /* fall through for I2C based SGMII */
+               /* Fall through for I2C based SGMII */
        case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES:
                /* read media type from SFP EEPROM */
                ret_val = e1000_set_sfp_media_type_82575(hw);
index 6fae6767f0111a2b08a150899c1869e3c1dca5b6..4cac3642e0747c14d917c782f141bca23462a048 100644 (file)
@@ -755,6 +755,7 @@ s32 e1000_init_mbx_params_pf(struct e1000_hw *hw)
                mbx->stats.reqs = 0;
                mbx->stats.acks = 0;
                mbx->stats.rsts = 0;
+               /* Fall through */
        default:
                return E1000_SUCCESS;
        }
index e8d922147b5746bb603af584010774992deaa012..be4786794e57c18642026eb0d4499d2dcc78e78d 100644 (file)
@@ -1274,6 +1274,7 @@ s32 e1000_copper_link_setup_m88_gen2(struct e1000_hw *hw)
                        phy_data |= M88E1000_PSCR_AUTO_X_1000T;
                        break;
                }
+               /* Fall through */
        case 0:
        default:
                phy_data |= M88E1000_PSCR_AUTO_X_MODE;
index 543fa7741cd8a5c2c326b3090f06a6ac731ccb60..dc109d5e047b0483fe2db8a351ad2c61792c9f9b 100644 (file)
@@ -462,8 +462,10 @@ s32 e1000_promisc_set_vf(struct e1000_hw *hw, enum e1000_promisc_type type)
                break;
        case e1000_promisc_enabled:
                msgbuf |= E1000_VF_SET_PROMISC_MULTICAST;
+               /* fall-through */
        case e1000_promisc_unicast:
                msgbuf |= E1000_VF_SET_PROMISC_UNICAST;
+               /* fall-through */
        case e1000_promisc_disabled:
                break;
        default: