Commit 5a2abdca authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kalle Valo
Browse files

iwlwifi: mvm: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly using the fallthrough pseudo-keyword as a
replacement for a number of "fall through" markings.

Notice that Clang doesn't recognize "fall through" comments as
implicit fall-through.

Link: https://github.com/KSPP/linux/issues/115


Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201117135053.GA13248@embeddedor
parent c42d492c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ int iwl_mvm_leds_init(struct iwl_mvm *mvm)
	switch (mode) {
	case IWL_LED_BLINK:
		IWL_ERR(mvm, "Blink led mode not supported, used default\n");
		/* fall through */
		fallthrough;
	case IWL_LED_DEFAULT:
	case IWL_LED_RF_STATE:
		mode = IWL_LED_RF_STATE;
+1 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
	case NL80211_IFTYPE_STATION:
		if (!vif->p2p)
			break;
		/* fall through */
		fallthrough;
	default:
		__clear_bit(0, data.available_mac_ids);
	}
+1 −1
Original line number Diff line number Diff line
@@ -4047,7 +4047,7 @@ static int __iwl_mvm_assign_vif_chanctx(struct iwl_mvm *mvm,
			mvmvif->ap_ibss_active = true;
			break;
		}
		/* fall through */
		fallthrough;
	case NL80211_IFTYPE_ADHOC:
		/*
		 * The AP binding flow is handled as part of the start_ap flow
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ u8 iwl_mvm_get_ctrl_pos(struct cfg80211_chan_def *chandef)
		return PHY_VHT_CTRL_POS_4_ABOVE;
	default:
		WARN(1, "Invalid channel definition");
		/* fall through */
		fallthrough;
	case 0:
		/*
		 * The FW is expected to check the control channel position only
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ static u32 iwl_mvm_set_mac80211_rx_flag(struct iwl_mvm *mvm,
		    !(rx_pkt_status & RX_MPDU_RES_STATUS_TTAK_OK))
			return 0;
		*crypt_len = IEEE80211_TKIP_IV_LEN;
		/* fall through */
		fallthrough;

	case RX_MPDU_RES_STATUS_SEC_WEP_ENC:
		if (!(rx_pkt_status & RX_MPDU_RES_STATUS_ICV_OK))
Loading