ath11k: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 27 Jul 2020 19:44:15 +0000 (14:44 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 18 Aug 2020 09:52:02 +0000 (12:52 +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/20200727194415.GA1275@embeddedor
drivers/net/wireless/ath/ath11k/core.c
drivers/net/wireless/ath/ath11k/dp.c
drivers/net/wireless/ath/ath11k/dp_rx.c
drivers/net/wireless/ath/ath11k/mac.c

index 4e39766..437b112 100644 (file)
@@ -729,7 +729,7 @@ static void ath11k_core_restart(struct work_struct *work)
                        break;
                case ATH11K_STATE_RESTARTED:
                        ar->state = ATH11K_STATE_WEDGED;
-                       /* fall through */
+                       fallthrough;
                case ATH11K_STATE_WEDGED:
                        ath11k_warn(ab,
                                    "device is wedged, will not restart radio %d\n", i);
index b0ea595..2617ec2 100644 (file)
@@ -268,7 +268,7 @@ int ath11k_dp_srng_setup(struct ath11k_base *ab, struct dp_srng *ring,
                        break;
                }
                /* follow through when ring_num >= 3 */
-               /* fall through */
+               fallthrough;
        case HAL_REO_EXCEPTION:
        case HAL_REO_REINJECT:
        case HAL_REO_CMD:
index 33c7c23..f3ca73d 100644 (file)
@@ -3782,8 +3782,7 @@ static bool ath11k_dp_rx_h_reo_err(struct ath11k *ar, struct sk_buff *msdu,
                 * instead, it is good to drop such packets in mac80211
                 * after incrementing the replay counters.
                 */
-
-               /* fall through */
+               fallthrough;
        default:
                /* TODO: Review other errors and process them to mac80211
                 * as appropriate.
index 9759a5d..220f8c9 100644 (file)
@@ -1146,13 +1146,13 @@ ath11k_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:
                case 7:
                        mcs = IEEE80211_VHT_MCS_SUPPORT_0_7;
                        break;
@@ -1164,7 +1164,7 @@ ath11k_peer_assoc_h_vht_limit(u16 tx_mcs_set,
                        break;
                default:
                        WARN_ON(1);
-                       /* fall through */
+                       fallthrough;
                case -1:
                        mcs = IEEE80211_VHT_MCS_NOT_SUPPORTED;
                        break;
@@ -1347,7 +1347,7 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
                arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
 
                arg->peer_he_mcs_count++;
-               /* fall through */
+               fallthrough;
 
        default:
                v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
@@ -2122,7 +2122,7 @@ void __ath11k_mac_scan_finish(struct ath11k *ar)
                } else if (ar->scan.roc_notify) {
                        ieee80211_remain_on_channel_expired(ar->hw);
                }
-               /* fall through */
+               fallthrough;
        case ATH11K_SCAN_STARTING:
                ar->scan.state = ATH11K_SCAN_IDLE;
                ar->scan_channel = NULL;
@@ -4383,7 +4383,7 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
                break;
        case NL80211_IFTYPE_MESH_POINT:
                arvif->vdev_subtype = WMI_VDEV_SUBTYPE_MESH_11S;
-               /* fall through */
+               fallthrough;
        case NL80211_IFTYPE_AP:
                arvif->vdev_type = WMI_VDEV_TYPE_AP;
                break;