]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
mt76: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 1 Sep 2020 17:33:41 +0000 (12:33 -0500)
committerFelix Fietkau <nbd@nbd.name>
Thu, 24 Sep 2020 16:10:19 +0000 (18:10 +0200)
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: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7603/dma.c
drivers/net/wireless/mediatek/mt76/mt7603/mac.c
drivers/net/wireless/mediatek/mt76/mt7615/mac.c
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
drivers/net/wireless/mediatek/mt76/mt7915/dma.c
drivers/net/wireless/mediatek/mt76/mt7915/mac.c
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
drivers/net/wireless/mediatek/mt76/usb.c

index 46be157d8c1a0f9db5d7d08315ccda10c8528bf1..d60d00f6f6a02d01789eadcd28eaa2ba65f57d4b 100644 (file)
@@ -121,7 +121,7 @@ void mt7603_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
                        mt76_rx(&dev->mt76, q, skb);
                        return;
                }
-               /* fall through */
+               fallthrough;
        default:
                dev_kfree_skb(skb);
                break;
index 97679eb4d067e40ae77119824ab12b76c05efa9d..f665a1c95eed2dd3c6ff1dc783bebdb81b1d0593 100644 (file)
@@ -592,7 +592,7 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
                switch (FIELD_GET(MT_RXV1_TX_MODE, rxdg0)) {
                case MT_PHY_TYPE_CCK:
                        cck = true;
-                       /* fall through */
+                       fallthrough;
                case MT_PHY_TYPE_OFDM:
                        i = mt76_get_rate(&dev->mt76, sband, i, cck);
                        break;
@@ -1163,7 +1163,7 @@ out:
        switch (FIELD_GET(MT_TX_RATE_MODE, final_rate)) {
        case MT_PHY_TYPE_CCK:
                cck = true;
-               /* fall through */
+               fallthrough;
        case MT_PHY_TYPE_OFDM:
                if (dev->mphy.chandef.chan->band == NL80211_BAND_5GHZ)
                        sband = &dev->mphy.sband_5g.sband;
index ab1fbf4c56b104e4ecd9c66372ee118e10fafe35..8dc645e398fda45aab9831e7ed3daa758891b69f 100644 (file)
@@ -378,7 +378,7 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
                switch (FIELD_GET(MT_RXV1_TX_MODE, rxdg0)) {
                case MT_PHY_TYPE_CCK:
                        cck = true;
-                       /* fall through */
+                       fallthrough;
                case MT_PHY_TYPE_OFDM:
                        i = mt76_get_rate(&dev->mt76, sband, i, cck);
                        break;
@@ -1271,7 +1271,7 @@ out:
        switch (FIELD_GET(MT_TX_RATE_MODE, final_rate)) {
        case MT_PHY_TYPE_CCK:
                cck = true;
-               /* fall through */
+               fallthrough;
        case MT_PHY_TYPE_OFDM:
                mphy = &dev->mphy;
                if (sta->wcid.ext_phy && dev->mt76.phy2)
@@ -1497,7 +1497,7 @@ void mt7615_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
                        mt76_rx(&dev->mt76, q, skb);
                        return;
                }
-               /* fall through */
+               fallthrough;
        default:
                dev_kfree_skb(skb);
                break;
index dae080e57272d725fa9b8306b285448ce09f2b9b..8de9bba384f4c84a9034ba42711ae05736437960 100644 (file)
@@ -3292,7 +3292,7 @@ static int mt7615_dcoc_freq_idx(u16 freq, u8 bw)
                        freq = freq_bw40[idx];
                        break;
                }
-               /* fall through */
+               fallthrough;
        case NL80211_CHAN_WIDTH_40:
                idx = mt7615_find_freq_idx(freq_bw40, ARRAY_SIZE(freq_bw40),
                                           freq);
index 09f34deb6ba1a201e47d1b51d52bc0c6f6062428..3de33aadf7941bf6ceafc90e66551c2aff56a4de 100644 (file)
@@ -734,7 +734,7 @@ mt76x0_phy_get_delta_power(struct mt76x02_dev *dev, u8 tx_mode,
        case 1:
                if (chan->band == NL80211_BAND_2GHZ)
                        tssi_target += 29491; /* 3.6 * 8192 */
-               /* fall through */
+               fallthrough;
        case 0:
                break;
        default:
index 8529837a846a98f402937a1107cf144446eac322..da6d3f51f6d47811cc7b7d64416ffd49ae7c4a0a 100644 (file)
@@ -300,7 +300,7 @@ mt76x02_mac_process_tx_rate(struct ieee80211_tx_rate *txrate, u16 rate,
                return 0;
        case MT_PHY_TYPE_HT_GF:
                txrate->flags |= IEEE80211_TX_RC_GREEN_FIELD;
-               /* fall through */
+               fallthrough;
        case MT_PHY_TYPE_HT:
                txrate->flags |= IEEE80211_TX_RC_MCS;
                txrate->idx = idx;
@@ -464,7 +464,7 @@ mt76x02_tx_rate_fallback(struct ieee80211_tx_rate *rates, int idx, int phy)
                        rates[1].idx = 0;
                        break;
                }
-               /* fall through */
+               fallthrough;
        default:
                rates[1].idx = max_t(int, rates[0].idx - 1, 0);
                break;
@@ -679,7 +679,7 @@ mt76x02_mac_process_rate(struct mt76x02_dev *dev,
                return 0;
        case MT_PHY_TYPE_HT_GF:
                status->enc_flags |= RX_ENC_FLAG_HT_GF;
-               /* fall through */
+               fallthrough;
        case MT_PHY_TYPE_HT:
                status->encoding = RX_ENC_HT;
                status->rate_idx = idx;
index 0f5de0507dc308597d1be8460759a11d960256bd..1049927faf2461148b6e2cbb589daeb877f6f19c 100644 (file)
@@ -21,7 +21,6 @@ static int mt7915_ser_trigger_set(void *data, u64 val)
        switch (val) {
        case SER_SET_RECOVER_L1:
        case SER_SET_RECOVER_L2:
-               /* fall through */
                ret = mt7915_mcu_set_ser(dev, SER_ENABLE, BIT(val), 0);
                if (ret)
                        return ret;
index 875badcc30703237dbae72e6540ef136438022c4..cfa12c4c671fa9488f1aff1c4cd58e9382c78f23 100644 (file)
@@ -66,7 +66,7 @@ void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
                        mt76_rx(&dev->mt76, q, skb);
                        return;
                }
-               /* fall through */
+               fallthrough;
        default:
                dev_kfree_skb(skb);
                break;
index defd0a98f7e22f228bb1c5a9c2af4092fdf0b105..c382e5ff2ca476be1a2c4d34b66ba0671333ab43 100644 (file)
@@ -471,7 +471,7 @@ int mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
                        switch (mode) {
                        case MT_PHY_TYPE_CCK:
                                cck = true;
-                               /* fall through */
+                               fallthrough;
                        case MT_PHY_TYPE_OFDM:
                                i = mt76_get_rate(&dev->mt76, sband, i, cck);
                                break;
@@ -490,7 +490,7 @@ int mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
                                break;
                        case MT_PHY_TYPE_HE_MU:
                                status->flag |= RX_FLAG_RADIOTAP_HE_MU;
-                               /* fall through */
+                               fallthrough;
                        case MT_PHY_TYPE_HE_SU:
                        case MT_PHY_TYPE_HE_EXT_SU:
                        case MT_PHY_TYPE_HE_TB:
index fdc2e1e72c002598923a9e29e436bc2c78174fbc..d43de4334617d4f4cd5d2a0c3b15d95d30c4d444 100644 (file)
@@ -1431,7 +1431,7 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
 
                he->max_nss_mcs[CMD_HE_MCS_BW160] =
                                he_cap->he_mcs_nss_supp.rx_mcs_160;
-               /* fall through */
+               fallthrough;
        default:
                he->max_nss_mcs[CMD_HE_MCS_BW80] =
                                he_cap->he_mcs_nss_supp.rx_mcs_80;
index edbcabd2b797d573e273fd6ed907f9f21be7aa3d..7d3f0a2e5fa05c446c5d0ba72cf88eedbc834864 100644 (file)
@@ -616,7 +616,7 @@ static void mt76u_complete_rx(struct urb *urb)
        default:
                dev_err_ratelimited(dev->dev, "rx urb failed: %d\n",
                                    urb->status);
-               /* fall through */
+               fallthrough;
        case 0:
                break;
        }