ath10k: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 27 Jul 2020 19:38:21 +0000 (14:38 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 17 Aug 2020 10:24:41 +0000 (13:24 +0300)
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200727193821.GA981@embeddedor
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/htt_rx.c
drivers/net/wireless/ath/ath10k/htt_tx.c
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/wow.c

index c4f098c..2f48086 100644 (file)
@@ -2321,7 +2321,7 @@ static void ath10k_core_restart(struct work_struct *work)
                break;
        case ATH10K_STATE_RESTARTED:
                ar->state = ATH10K_STATE_WEDGED;
-               /* fall through */
+               fallthrough;
        case ATH10K_STATE_WEDGED:
                ath10k_warn(ar, "device is wedged, will not restart\n");
                break;
index 69ad4ca..136cbf0 100644 (file)
@@ -3025,7 +3025,7 @@ static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb)
                        ath10k_htt_rx_h_enqueue(ar, &amsdu, status);
                        break;
                case -EAGAIN:
-                       /* fall through */
+                       fallthrough;
                default:
                        /* Should not happen. */
                        ath10k_warn(ar, "failed to extract amsdu: %d\n", ret);
index bbe8695..1fc0a31 100644 (file)
@@ -1314,7 +1314,7 @@ static int ath10k_htt_tx_hl(struct ath10k_htt *htt, enum ath10k_hw_txrx_mode txm
        case ATH10K_HW_TXRX_RAW:
        case ATH10K_HW_TXRX_NATIVE_WIFI:
                flags0 |= HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT;
-               /* fall through */
+               fallthrough;
        case ATH10K_HW_TXRX_ETHERNET:
                flags0 |= SM(txmode, HTT_DATA_TX_DESC_FLAGS0_PKT_TYPE);
                break;
@@ -1460,7 +1460,7 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt,
        case ATH10K_HW_TXRX_RAW:
        case ATH10K_HW_TXRX_NATIVE_WIFI:
                flags0 |= HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT;
-               /* fall through */
+               fallthrough;
        case ATH10K_HW_TXRX_ETHERNET:
                if (ar->hw_params.continuous_frag_desc) {
                        ext_desc_t = htt->frag_desc.vaddr_desc_32;
@@ -1662,7 +1662,7 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
        case ATH10K_HW_TXRX_RAW:
        case ATH10K_HW_TXRX_NATIVE_WIFI:
                flags0 |= HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT;
-               /* fall through */
+               fallthrough;
        case ATH10K_HW_TXRX_ETHERNET:
                if (ar->hw_params.continuous_frag_desc) {
                        ext_desc_t = htt->frag_desc.vaddr_desc_64;
index de3922e..78e97ec 100644 (file)
@@ -2473,17 +2473,17 @@ ath10k_peer_assoc_h_vht_limit(u16 tx_mcs_set,
                        idx_limit = -1;
 
                switch (idx_limit) {
-               case 0: /* fall through */
-               case 1: /* fall through */
-               case 2: /* fall through */
-               case 3: /* fall through */
-               case 4: /* fall through */
-               case 5: /* fall through */
-               case 6: /* fall through */
+               case 0:
+               case 1:
+               case 2:
+               case 3:
+               case 4:
+               case 5:
+               case 6:
                default:
                        /* see ath10k_mac_can_set_bitrate_mask() */
                        WARN_ON(1);
-                       /* fall through */
+                       fallthrough;
                case -1:
                        mcs = IEEE80211_VHT_MCS_NOT_SUPPORTED;
                        break;
@@ -4243,7 +4243,7 @@ void __ath10k_scan_finish(struct ath10k *ar)
                } else if (ar->scan.roc_notify) {
                        ieee80211_remain_on_channel_expired(ar->hw);
                }
-               /* fall through */
+               fallthrough;
        case ATH10K_SCAN_STARTING:
                ar->scan.state = ATH10K_SCAN_IDLE;
                ar->scan_channel = NULL;
index 8c26add..7d65c11 100644 (file)
@@ -275,7 +275,7 @@ static int ath10k_vif_wow_set_wakeups(struct ath10k_vif *arvif,
        switch (arvif->vdev_type) {
        case WMI_VDEV_TYPE_IBSS:
                __set_bit(WOW_BEACON_EVENT, &wow_mask);
-                /* fall through */
+               fallthrough;
        case WMI_VDEV_TYPE_AP:
                __set_bit(WOW_DEAUTH_RECVD_EVENT, &wow_mask);
                __set_bit(WOW_DISASSOC_RECVD_EVENT, &wow_mask);