Skip to contentSkip to conversation

iwlwifi: add missing break / fall-through in switch cases

PATCH In review Emmanuel Grumbach 1 participant 2 messages Dec 19, 2018 Intel wireless wifi link (iwlwifi)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: add missing break / fall-through in switch cases

Two switch cases that were added recently missed break statement and explicit fall-through. Fix this.

Fixes f14cda6f3b31 ("iwlwifi: trans: parse and store debug ini TLVs")
---
 drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 5 +++++
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c     | 5 +++++
 2 files changed, 10 insertions(+)
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +5 -0
index bc1e4d4bb42d..b05fe75394fa 100644
@@ -196,11 +196,16 @@ static int iwl_parse_fw_dbg_tlv(struct iwl_trans *trans, const u8 *data,
 
 		switch (tlv_type) {
 		case IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION:
+		/* fall-through */
 		case IWL_UCODE_TLV_TYPE_HCMD:
+		/* fall-through */
 		case IWL_UCODE_TLV_TYPE_REGIONS:
+		/* fall-through */
 		case IWL_UCODE_TLV_TYPE_TRIGGERS:
+		/* fall-through */
 		case IWL_UCODE_TLV_TYPE_DEBUG_FLOW:
 			iwl_fw_dbg_copy_tlv(trans, tlv, true);
+			break;
 		default:
 			WARN_ONCE(1, "Invalid TLV %x\n", tlv_type);
 			break;
drivers/net/wireless/intel/iwlwifi/iwl-drv.c +5 -0
index a65ba955783d..db95cb81c67d 100644
@@ -1091,12 +1091,17 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
 			break;
 			}
 		case IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION:
+		/* fall-through */
 		case IWL_UCODE_TLV_TYPE_HCMD:
+		/* fall-through */
 		case IWL_UCODE_TLV_TYPE_REGIONS:
+		/* fall-through */
 		case IWL_UCODE_TLV_TYPE_TRIGGERS:
+		/* fall-through */
 		case IWL_UCODE_TLV_TYPE_DEBUG_FLOW:
 			if (iwlwifi_mod_params.enable_ini)
 				iwl_fw_dbg_copy_tlv(drv->trans, tlv, false);
+			break;
 		default:
 			IWL_DEBUG_INFO(drv, "unknown TLV: %d\n", tlv_type);
 			break;
Signature · 1 line
2.14.4
#1 lore raw
Quoted 9 lines

Subject: [PATCH] iwlwifi: add missing break / fall-through in switch cases

Two switch cases that were added recently missed break statement and explicit fall-through. Fix this.

Fixes f14cda6f3b31 ("iwlwifi: trans: parse and store debug ini TLVs")

---

Please drop this. We have another patch that fixes the problems and adds less noise.