net: wireless: Convert to use the preferred fallthrough macro
authorMiaohe Lin <linmiaohe@huawei.com>
Sat, 22 Aug 2020 08:23:23 +0000 (04:23 -0400)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 27 Aug 2020 09:24:28 +0000 (11:24 +0200)
Convert the uses of fallthrough comments to fallthrough macro.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Link: https://lore.kernel.org/r/20200822082323.45495-1-linmiaohe@huawei.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/chan.c
net/wireless/mlme.c
net/wireless/nl80211.c
net/wireless/scan.c
net/wireless/sme.c
net/wireless/util.c
net/wireless/wext-compat.c

index 90f0f82..e97a4f0 100644 (file)
@@ -957,7 +957,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
                if (!ht_cap->ht_supported &&
                    chandef->chan->band != NL80211_BAND_6GHZ)
                        return false;
-               /* fall through */
+               fallthrough;
        case NL80211_CHAN_WIDTH_20_NOHT:
                prohibited_flags |= IEEE80211_CHAN_NO_20MHZ;
                width = 20;
@@ -983,7 +983,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
                if (chandef->chan->band != NL80211_BAND_6GHZ &&
                    cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)
                        return false;
-               /* fall through */
+               fallthrough;
        case NL80211_CHAN_WIDTH_80:
                prohibited_flags |= IEEE80211_CHAN_NO_80MHZ;
                width = 80;
index a6c61a2..db7333e 100644 (file)
@@ -941,7 +941,7 @@ void cfg80211_cac_event(struct net_device *netdev,
                       sizeof(struct cfg80211_chan_def));
                queue_work(cfg80211_wq, &rdev->propagate_cac_done_wk);
                cfg80211_sched_dfs_chan_update(rdev);
-               /* fall through */
+               fallthrough;
        case NL80211_RADAR_CAC_ABORTED:
                wdev->cac_started = false;
                break;
index e45b954..35016d5 100644 (file)
@@ -2105,7 +2105,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
                state->split_start++;
                if (state->split)
                        break;
-               /* fall through */
+               fallthrough;
        case 1:
                if (nla_put(msg, NL80211_ATTR_CIPHER_SUITES,
                            sizeof(u32) * rdev->wiphy.n_cipher_suites,
@@ -2152,7 +2152,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
                state->split_start++;
                if (state->split)
                        break;
-               /* fall through */
+               fallthrough;
        case 2:
                if (nl80211_put_iftypes(msg, NL80211_ATTR_SUPPORTED_IFTYPES,
                                        rdev->wiphy.interface_modes))
@@ -2160,7 +2160,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
                state->split_start++;
                if (state->split)
                        break;
-               /* fall through */
+               fallthrough;
        case 3:
                nl_bands = nla_nest_start_noflag(msg,
                                                 NL80211_ATTR_WIPHY_BANDS);
@@ -2187,7 +2187,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
                                state->chan_start++;
                                if (state->split)
                                        break;
-                               /* fall through */
+                               fallthrough;
                        default:
                                /* add frequencies */
                                nl_freqs = nla_nest_start_noflag(msg,
@@ -2242,7 +2242,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
                        state->split_start++;
                if (state->split)
                        break;
-               /* fall through */
+               fallthrough;
        case 4:
                nl_cmds = nla_nest_start_noflag(msg,
                                                NL80211_ATTR_SUPPORTED_COMMANDS);
@@ -2271,7 +2271,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
                state->split_start++;
                if (state->split)
                        break;
-               /* fall through */
+               fallthrough;
        case 5:
                if (rdev->ops->remain_on_channel &&
                    (rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL) &&
@@ -2289,7 +2289,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
                state->split_start++;
                if (state->split)
                        break;
-               /* fall through */
+               fallthrough;
        case 6:
 #ifdef CONFIG_PM
                if (nl80211_send_wowlan(msg, rdev, state->split))
@@ -2300,7 +2300,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
 #else
                state->split_start++;
 #endif
-               /* fall through */
+               fallthrough;
        case 7:
                if (nl80211_put_iftypes(msg, NL80211_ATTR_SOFTWARE_IFTYPES,
                                        rdev->wiphy.software_iftypes))
@@ -2313,7 +2313,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
                state->split_start++;
                if (state->split)
                        break;
-               /* fall through */
+               fallthrough;
        case 8:
                if ((rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME) &&
                    nla_put_u32(msg, NL80211_ATTR_DEVICE_AP_SME,
@@ -5205,7 +5205,7 @@ bool nl80211_put_sta_rate(struct sk_buff *msg, struct rate_info *info, int attr)
                break;
        default:
                WARN_ON(1);
-               /* fall through */
+               fallthrough;
        case RATE_INFO_BW_20:
                rate_flg = 0;
                break;
index 5e25d29..84fc8ab 100644 (file)
@@ -1433,7 +1433,7 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy,
        switch (ftype) {
        case CFG80211_BSS_FTYPE_BEACON:
                ies->from_beacon = true;
-               /* fall through */
+               fallthrough;
        case CFG80211_BSS_FTYPE_UNKNOWN:
                rcu_assign_pointer(tmp.pub.beacon_ies, ies);
                break;
index 064f0c3..38df713 100644 (file)
@@ -205,7 +205,7 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev,
                return err;
        case CFG80211_CONN_ASSOC_FAILED_TIMEOUT:
                *treason = NL80211_TIMEOUT_ASSOC;
-               /* fall through */
+               fallthrough;
        case CFG80211_CONN_ASSOC_FAILED:
                cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
                                     NULL, 0,
@@ -215,7 +215,7 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev,
                cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
                                     NULL, 0,
                                     WLAN_REASON_DEAUTH_LEAVING, false);
-               /* fall through */
+               fallthrough;
        case CFG80211_CONN_ABANDON:
                /* free directly, disconnected event already sent */
                cfg80211_sme_free(wdev);
index dfad1c0..7c5d536 100644 (file)
@@ -198,7 +198,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband)
                                sband->bitrates[i].flags |=
                                        IEEE80211_RATE_MANDATORY_G;
                                want--;
-                               /* fall through */
+                               fallthrough;
                        default:
                                sband->bitrates[i].flags |=
                                        IEEE80211_RATE_ERP_G;
@@ -1008,7 +1008,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
                case NL80211_IFTYPE_STATION:
                        if (dev->ieee80211_ptr->use_4addr)
                                break;
-                       /* fall through */
+                       fallthrough;
                case NL80211_IFTYPE_OCB:
                case NL80211_IFTYPE_P2P_CLIENT:
                case NL80211_IFTYPE_ADHOC:
index 46ee612..78f2927 100644 (file)
@@ -1334,7 +1334,7 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
                        wstats.qual.qual = sig + 110;
                        break;
                }
-               /* fall through */
+               fallthrough;
        case CFG80211_SIGNAL_TYPE_UNSPEC:
                if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_SIGNAL)) {
                        wstats.qual.updated |= IW_QUAL_LEVEL_UPDATED;
@@ -1343,7 +1343,7 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
                        wstats.qual.qual = sinfo.signal;
                        break;
                }
-               /* fall through */
+               fallthrough;
        default:
                wstats.qual.updated |= IW_QUAL_LEVEL_INVALID;
                wstats.qual.updated |= IW_QUAL_QUAL_INVALID;