]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ath9k: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 27 Jul 2020 19:35:20 +0000 (14:35 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 14 Aug 2020 15:04:06 +0000 (18:04 +0300)
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].

[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/20200727193520.GA832@embeddedor
drivers/net/wireless/ath/ath9k/ar5008_phy.c
drivers/net/wireless/ath/ath9k/ar9002_mac.c
drivers/net/wireless/ath/ath9k/ar9002_phy.c
drivers/net/wireless/ath/ath9k/ar9003_mac.c
drivers/net/wireless/ath/ath9k/channel.c
drivers/net/wireless/ath/ath9k/eeprom_def.c
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/main.c

index dae95402eb3a9f37dfb16960219bc54beddafc10..0d34356baf73af38aa33c8a2b88cd07b68ad531b 100644 (file)
@@ -579,14 +579,14 @@ static void ar5008_hw_init_chain_masks(struct ath_hw *ah)
        case 0x5:
                REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
                            AR_PHY_SWAP_ALT_CHAIN);
-               /* fall through */
+               fallthrough;
        case 0x3:
                if (ah->hw_version.macVersion == AR_SREV_REVISION_5416_10) {
                        REG_WRITE(ah, AR_PHY_RX_CHAINMASK, 0x7);
                        REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, 0x7);
                        break;
                }
-               /* fall through */
+               fallthrough;
        case 0x1:
        case 0x2:
        case 0x7:
index 4b3c9b10819766dc90cf28a4f972ae9e71099c7e..ce9a0a53771ef2201c606d73f20fbe509d7a8147 100644 (file)
@@ -267,7 +267,7 @@ ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i)
        switch (i->aggr) {
        case AGGR_BUF_FIRST:
                ctl6 |= SM(i->aggr_len, AR_AggrLen);
-               /* fall through */
+               fallthrough;
        case AGGR_BUF_MIDDLE:
                ctl1 |= AR_IsAggr | AR_MoreAggr;
                ctl6 |= SM(i->ndelim, AR_PadDelim);
index 6f32b8d2ec7f99b0b0d8e8b840848720dbdaa35e..fcfed8e59d291fecb6d7c7e01350ab0c0539e521 100644 (file)
@@ -119,7 +119,7 @@ static int ar9002_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
                                aModeRefSel = 2;
                        if (aModeRefSel)
                                break;
-                       /* fall through */
+                       fallthrough;
                case 1:
                default:
                        aModeRefSel = 0;
index e1fe7a7c3ad8f2ea3ad5040bc767da6cc9ade1c2..76b538942a793e465d7801f5ce133bd7194dc004 100644 (file)
@@ -120,7 +120,7 @@ ar9003_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i)
        switch (i->aggr) {
        case AGGR_BUF_FIRST:
                ctl17 |= SM(i->aggr_len, AR_AggrLen);
-               /* fall through */
+               fallthrough;
        case AGGR_BUF_MIDDLE:
                ctl12 |= AR_IsAggr | AR_MoreAggr;
                ctl17 |= SM(i->ndelim, AR_PadDelim);
index fd61ae4782b63632c7f8a7ccc9a107e7274bd587..6cf08752215725fdcf47a16de94241c2132e216a 100644 (file)
@@ -706,7 +706,7 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
                        "Move chanctx state from FORCE_ACTIVE to IDLE\n");
 
                sc->sched.state = ATH_CHANCTX_STATE_IDLE;
-               /* fall through */
+               fallthrough;
        case ATH_CHANCTX_EVENT_SWITCH:
                if (!test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags) ||
                    sc->sched.state == ATH_CHANCTX_STATE_FORCE_ACTIVE ||
@@ -1080,7 +1080,7 @@ static void ath_offchannel_timer(struct timer_list *t)
                        mod_timer(&sc->offchannel.timer, jiffies + HZ / 10);
                        break;
                }
-               /* fall through */
+               fallthrough;
        case ATH_OFFCHANNEL_SUSPEND:
                if (!sc->offchannel.scan_req)
                        return;
index 56b44fc7a8e6a2a5c9cf0808b776b79157214844..9729a69d3e2e3656b30fd7612b00d86914bfcaa9 100644 (file)
@@ -402,7 +402,7 @@ static u32 ath9k_hw_def_get_eeprom(struct ath_hw *ah,
                        return AR5416_PWR_TABLE_OFFSET_DB;
        case EEP_ANTENNA_GAIN_2G:
                band = 1;
-               /* fall through */
+               fallthrough;
        case EEP_ANTENNA_GAIN_5G:
                return max_t(u8, max_t(u8,
                        pModal[band].antennaGainCh[0],
index 8c97db73e34c75490f8cce43d40c2d33fb78dccb..6609ce122e6e5ae29b52601fc5d011a0ec30fad3 100644 (file)
@@ -1277,12 +1277,12 @@ static void ath9k_hw_set_operating_mode(struct ath_hw *ah, int opmode)
                        REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION);
                        break;
                }
-               /* fall through */
+               fallthrough;
        case NL80211_IFTYPE_OCB:
        case NL80211_IFTYPE_MESH_POINT:
        case NL80211_IFTYPE_AP:
                set |= AR_STA_ID1_STA_AP;
-               /* fall through */
+               fallthrough;
        case NL80211_IFTYPE_STATION:
                REG_CLR_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION);
                break;
@@ -2293,7 +2293,7 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
        case NL80211_IFTYPE_ADHOC:
                REG_SET_BIT(ah, AR_TXCFG,
                            AR_TXCFG_ADHOC_BEACON_ATIM_TX_POLICY);
-               /* fall through */
+               fallthrough;
        case NL80211_IFTYPE_MESH_POINT:
        case NL80211_IFTYPE_AP:
                REG_WRITE(ah, AR_NEXT_TBTT_TIMER, next_beacon);
index a47f6e978095ad77cb1bcf5de5006e967756d547..0ea3b80f664c6e5c3ba54eea0ee6f6b0337134a7 100644 (file)
@@ -1934,7 +1934,7 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
        case IEEE80211_AMPDU_TX_STOP_FLUSH:
        case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
                flush = true;
-               /* fall through */
+               fallthrough;
        case IEEE80211_AMPDU_TX_STOP_CONT:
                ath9k_ps_wakeup(sc);
                ath_tx_aggr_stop(sc, sta, tid);