ath5k: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 27 Jul 2020 19:49:30 +0000 (14:49 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 17 Aug 2020 10:19:33 +0000 (13:19 +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/20200727194930.GA1491@embeddedor
drivers/net/wireless/ath/ath5k/eeprom.c
drivers/net/wireless/ath/ath5k/pcu.c
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/ath/ath5k/reset.c

index 307f1fea0a888558e47b413582e18027a7d11c92..1fbc2c19848f2161662d05dc0bd0a25841117daf 100644 (file)
@@ -1172,13 +1172,13 @@ ath5k_cal_data_offset_2413(struct ath5k_eeprom_info *ee, int mode)
                        offset += ath5k_pdgains_size_2413(ee,
                                        AR5K_EEPROM_MODE_11B) +
                                        AR5K_EEPROM_N_2GHZ_CHAN_2413 / 2;
-               /* fall through */
+               fallthrough;
        case AR5K_EEPROM_MODE_11B:
                if (AR5K_EEPROM_HDR_11A(ee->ee_header))
                        offset += ath5k_pdgains_size_2413(ee,
                                        AR5K_EEPROM_MODE_11A) +
                                        AR5K_EEPROM_N_5GHZ_CHAN / 2;
-               /* fall through */
+               fallthrough;
        case AR5K_EEPROM_MODE_11A:
                break;
        default:
index 05140d8baa360e73bb15bdf6b73135304b25ecd9..7e9c3f0f8607208d07f1724119a972d4e71c74e1 100644 (file)
@@ -670,7 +670,7 @@ ath5k_hw_init_beacon_timers(struct ath5k_hw *ah, u32 next_beacon, u32 interval)
                break;
        case NL80211_IFTYPE_ADHOC:
                AR5K_REG_ENABLE_BITS(ah, AR5K_TXCFG, AR5K_TXCFG_ADHOC_BCN_ATIM);
-               /* fall through */
+               fallthrough;
        default:
                /* On non-STA modes timer1 is used as next DMA
                 * beacon alert (DBA) timer and timer2 as next
@@ -913,7 +913,7 @@ ath5k_hw_set_opmode(struct ath5k_hw *ah, enum nl80211_iftype op_mode)
                pcu_reg |= AR5K_STA_ID1_KEYSRCH_MODE
                        | (ah->ah_version == AR5K_AR5210 ?
                                AR5K_STA_ID1_PWR_SV : 0);
-               /* fall through */
+               fallthrough;
        case NL80211_IFTYPE_MONITOR:
                pcu_reg |= AR5K_STA_ID1_KEYSRCH_MODE
                        | (ah->ah_version == AR5K_AR5210 ?
index ae08572c4b58e1d58f8553b1ec17c5f0716d159c..00f9e347d414dcd79eb74bcd0033c1583222878a 100644 (file)
@@ -3229,10 +3229,10 @@ ath5k_write_pwr_to_pdadc_table(struct ath5k_hw *ah, u8 ee_mode)
        switch (pdcurves) {
        case 3:
                reg |= AR5K_REG_SM(pdg_to_idx[2], AR5K_PHY_TPC_RG1_PDGAIN_3);
-               /* Fall through */
+               fallthrough;
        case 2:
                reg |= AR5K_REG_SM(pdg_to_idx[1], AR5K_PHY_TPC_RG1_PDGAIN_2);
-               /* Fall through */
+               fallthrough;
        case 1:
                reg |= AR5K_REG_SM(pdg_to_idx[0], AR5K_PHY_TPC_RG1_PDGAIN_1);
                break;
@@ -3353,7 +3353,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
                                        table_min[pdg] = table_max[pdg] - 126;
                        }
 
-                       /* Fall through */
+                       fallthrough;
                case AR5K_PWRTABLE_PWR_TO_PCDAC:
                case AR5K_PWRTABLE_PWR_TO_PDADC:
 
index 56d7925a0c2cdadc30f88c3125abe58610bbd8bb..9fdb5283b39c32c2fb707c7f754669ac57188311 100644 (file)
@@ -522,7 +522,7 @@ ath5k_hw_set_power_mode(struct ath5k_hw *ah, enum ath5k_power_mode mode,
        switch (mode) {
        case AR5K_PM_AUTO:
                staid &= ~AR5K_STA_ID1_DEFAULT_ANTENNA;
-               /* fallthrough */
+               fallthrough;
        case AR5K_PM_NETWORK_SLEEP:
                if (set_chip)
                        ath5k_hw_reg_write(ah,