git: 1f80b2b78d24 - stable/13 - e1000: Consistently use FALLTHROUGH

Kevin Bowling kbowling at FreeBSD.org
Tue Sep 28 16:57:34 UTC 2021


The branch stable/13 has been updated by kbowling (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=1f80b2b78d240c46867c85ac1376228c5eb16664

commit 1f80b2b78d240c46867c85ac1376228c5eb16664
Author:     Kevin Bowling <kbowling at FreeBSD.org>
AuthorDate: 2021-09-17 03:13:26 +0000
Commit:     Kevin Bowling <kbowling at FreeBSD.org>
CommitDate: 2021-09-28 16:55:59 +0000

    e1000: Consistently use FALLTHROUGH
    
    Approved by:    imp
    MFC after:      1 week
    
    (cherry picked from commit e05d9788b7e90ffd6405dc59656b52a63ba7ff3e)
---
 sys/dev/e1000/e1000_82540.c   |  2 +-
 sys/dev/e1000/e1000_82571.c   |  4 ++--
 sys/dev/e1000/e1000_82575.c   |  6 ++++++
 sys/dev/e1000/e1000_ich8lan.c | 16 ++++++++--------
 sys/dev/e1000/e1000_nvm.c     |  2 +-
 sys/dev/e1000/e1000_phy.c     |  6 +++++-
 6 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/sys/dev/e1000/e1000_82540.c b/sys/dev/e1000/e1000_82540.c
index 720798260f8a..e60fc8ebf08e 100644
--- a/sys/dev/e1000/e1000_82540.c
+++ b/sys/dev/e1000/e1000_82540.c
@@ -100,7 +100,7 @@ static s32 e1000_init_phy_params_82540(struct e1000_hw *hw)
 	case e1000_82546_rev_3:
 		if (phy->id == M88E1011_I_PHY_ID)
 			break;
-		/* Fall Through */
+		/* FALLTHROUGH */
 	default:
 		ret_val = -E1000_ERR_PHY;
 		goto out;
diff --git a/sys/dev/e1000/e1000_82571.c b/sys/dev/e1000/e1000_82571.c
index cae9afcb2d78..ce9ae8791654 100644
--- a/sys/dev/e1000/e1000_82571.c
+++ b/sys/dev/e1000/e1000_82571.c
@@ -238,7 +238,7 @@ static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw)
 			E1000_WRITE_REG(hw, E1000_EECD, eecd);
 			break;
 		}
-		/* Fall Through */
+		/* FALLTHROUGH */
 	default:
 		nvm->type = e1000_nvm_eeprom_spi;
 		size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >>
@@ -1115,7 +1115,7 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
 	switch (mac->type) {
 	case e1000_82573:
 		e1000_enable_tx_pkt_filtering_generic(hw);
-		/* fall through */
+		/* FALLTHROUGH */
 	case e1000_82574:
 	case e1000_82583:
 		reg_data = E1000_READ_REG(hw, E1000_GCR);
diff --git a/sys/dev/e1000/e1000_82575.c b/sys/dev/e1000/e1000_82575.c
index 59d8b9c85dc3..a0c057e5f07f 100644
--- a/sys/dev/e1000/e1000_82575.c
+++ b/sys/dev/e1000/e1000_82575.c
@@ -1443,13 +1443,19 @@ static s32 e1000_setup_copper_link_82575(struct e1000_hw *hw)
 	}
 	switch (hw->phy.type) {
 	case e1000_phy_i210:
+		/* FALLTHROUGH */
 	case e1000_phy_m88:
 		switch (hw->phy.id) {
 		case I347AT4_E_PHY_ID:
+			/* FALLTHROUGH */
 		case M88E1112_E_PHY_ID:
+			/* FALLTHROUGH */
 		case M88E1340M_E_PHY_ID:
+			/* FALLTHROUGH */
 		case M88E1543_E_PHY_ID:
+			/* FALLTHROUGH */
 		case M88E1512_E_PHY_ID:
+			/* FALLTHROUGH */
 		case I210_I_PHY_ID:
 			ret_val = e1000_copper_link_setup_m88_gen2(hw);
 			break;
diff --git a/sys/dev/e1000/e1000_ich8lan.c b/sys/dev/e1000/e1000_ich8lan.c
index 5cd13579d50c..4209595a911c 100644
--- a/sys/dev/e1000/e1000_ich8lan.c
+++ b/sys/dev/e1000/e1000_ich8lan.c
@@ -365,12 +365,12 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
 		 */
 		 msec_delay(50);
 
-		/* fall-through */
+		/* FALLTHROUGH */
 	case e1000_pch2lan:
 		if (e1000_phy_is_accessible_pchlan(hw))
 			break;
 
-		/* fall-through */
+		/* FALLTHROUGH */
 	case e1000_pchlan:
 		if ((hw->mac.type == e1000_pchlan) &&
 		    (fwsm & E1000_ICH_FWSM_FW_VALID))
@@ -493,7 +493,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
 				return ret_val;
 			if ((phy->id != 0) && (phy->id != PHY_REVISION_MASK))
 				break;
-			/* fall-through */
+			/* FALLTHROUGH */
 		case e1000_pch2lan:
 		case e1000_pch_lpt:
 		case e1000_pch_spt:
@@ -796,7 +796,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
 	case e1000_pch2lan:
 		mac->rar_entry_count = E1000_PCH2_RAR_ENTRIES;
 		mac->ops.rar_set = e1000_rar_set_pch2lan;
-		/* fall-through */
+		/* FALLTHROUGH */
 	case e1000_pch_lpt:
 	case e1000_pch_spt:
 	case e1000_pch_cnp:
@@ -806,7 +806,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
 		/* multicast address update for pch2 */
 		mac->ops.update_mc_addr_list =
 			e1000_update_mc_addr_list_pch2lan;
-		/* fall-through */
+		/* FALLTHROUGH */
 	case e1000_pchlan:
 		/* check management mode */
 		mac->ops.check_mng_mode = e1000_check_mng_mode_pchlan;
@@ -1761,7 +1761,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
 		ret_val = e1000_k1_workaround_lv(hw);
 		if (ret_val)
 			return ret_val;
-		/* fall-thru */
+		/* FALLTHROUGH */
 	case e1000_pchlan:
 		if (hw->phy.type == e1000_phy_82578) {
 			ret_val = e1000_link_stall_workaround_hv(hw);
@@ -2299,7 +2299,7 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
 			sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG;
 			break;
 		}
-		/* Fall-thru */
+		/* FALLTHROUGH */
 	case e1000_pchlan:
 	case e1000_pch2lan:
 	case e1000_pch_lpt:
@@ -3479,7 +3479,7 @@ static s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
 			return E1000_SUCCESS;
 		}
 		DEBUGOUT("Unable to determine valid NVM bank via EEC - reading flash signature\n");
-		/* fall-thru */
+		/* FALLTHROUGH */
 	default:
 		/* set bank to 0 in case flash read fails */
 		*bank = 0;
diff --git a/sys/dev/e1000/e1000_nvm.c b/sys/dev/e1000/e1000_nvm.c
index 31bbfcc6981d..8911204f0b91 100644
--- a/sys/dev/e1000/e1000_nvm.c
+++ b/sys/dev/e1000/e1000_nvm.c
@@ -1321,7 +1321,7 @@ void e1000_get_fw_version(struct e1000_hw *hw, struct e1000_fw_version *fw_vers)
 			e1000_read_invm_version(hw, fw_vers);
 			return;
 		}
-		/* fall through */
+		/* FALLTHROUGH */
 	case e1000_i350:
 		hw->nvm.ops.read(hw, NVM_ETRACK_HIWORD, 1, &etrack_test);
 		/* find combo image version */
diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c
index e5fd942464b6..872a5267bfdb 100644
--- a/sys/dev/e1000/e1000_phy.c
+++ b/sys/dev/e1000/e1000_phy.c
@@ -1038,7 +1038,7 @@ static s32 e1000_set_master_slave_mode(struct e1000_hw *hw)
 		break;
 	case e1000_ms_auto:
 		phy_data &= ~CR_1000T_MS_ENABLE;
-		/* fall-through */
+		/* FALLTHROUGH */
 	default:
 		break;
 	}
@@ -1098,6 +1098,7 @@ s32 e1000_copper_link_setup_82577(struct e1000_hw *hw)
 		phy_data |= I82577_PHY_CTRL2_MANUAL_MDIX;
 		break;
 	case 0:
+		/* FALLTHROUGH */
 	default:
 		phy_data |= I82577_PHY_CTRL2_AUTO_MDI_MDIX;
 		break;
@@ -1154,6 +1155,7 @@ s32 e1000_copper_link_setup_m88(struct e1000_hw *hw)
 		phy_data |= M88E1000_PSCR_AUTO_X_1000T;
 		break;
 	case 0:
+		/* FALLTHROUGH */
 	default:
 		phy_data |= M88E1000_PSCR_AUTO_X_MODE;
 		break;
@@ -1306,6 +1308,7 @@ s32 e1000_copper_link_setup_m88_gen2(struct e1000_hw *hw)
 		}
 		/* FALLTHROUGH */
 	case 0:
+		/* FALLTHROUGH */
 	default:
 		phy_data |= M88E1000_PSCR_AUTO_X_MODE;
 		break;
@@ -1420,6 +1423,7 @@ s32 e1000_copper_link_setup_igp(struct e1000_hw *hw)
 		data |= IGP01E1000_PSCR_FORCE_MDI_MDIX;
 		break;
 	case 0:
+		/* FALLTHROUGH */
 	default:
 		data |= IGP01E1000_PSCR_AUTO_MDIX;
 		break;


More information about the dev-commits-src-all mailing list