mwifiex: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 21 Aug 2020 06:47:20 +0000 (01:47 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 27 Aug 2020 09:59:17 +0000 (12:59 +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/20200821064720.GA22182@embeddedor
drivers/net/wireless/marvell/mwifiex/cfg80211.c
drivers/net/wireless/marvell/mwifiex/ie.c
drivers/net/wireless/marvell/mwifiex/scan.c

index 96848fa..a6b9dc6 100644 (file)
@@ -1163,7 +1163,7 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
                case NL80211_IFTYPE_UNSPECIFIED:
                        mwifiex_dbg(priv->adapter, INFO,
                                    "%s: kept type as IBSS\n", dev->name);
-                       /* fall through */
+                       fallthrough;
                case NL80211_IFTYPE_ADHOC:      /* This shouldn't happen */
                        return 0;
                default:
@@ -1194,7 +1194,7 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
                case NL80211_IFTYPE_UNSPECIFIED:
                        mwifiex_dbg(priv->adapter, INFO,
                                    "%s: kept type as STA\n", dev->name);
-                       /* fall through */
+                       fallthrough;
                case NL80211_IFTYPE_STATION:    /* This shouldn't happen */
                        return 0;
                default:
@@ -1217,7 +1217,7 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
                case NL80211_IFTYPE_UNSPECIFIED:
                        mwifiex_dbg(priv->adapter, INFO,
                                    "%s: kept type as AP\n", dev->name);
-                       /* fall through */
+                       fallthrough;
                case NL80211_IFTYPE_AP:         /* This shouldn't happen */
                        return 0;
                default:
@@ -1257,7 +1257,7 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
                case NL80211_IFTYPE_UNSPECIFIED:
                        mwifiex_dbg(priv->adapter, INFO,
                                    "%s: kept type as P2P\n", dev->name);
-                       /* fall through */
+                       fallthrough;
                case NL80211_IFTYPE_P2P_CLIENT:
                case NL80211_IFTYPE_P2P_GO:
                        return 0;
index 811abe9..40e99ea 100644 (file)
@@ -374,7 +374,7 @@ static int mwifiex_uap_parse_tail_ies(struct mwifiex_private *priv,
                                                    (const u8 *)hdr,
                                                    token_len))
                                break;
-                       /* fall through */
+                       fallthrough;
                default:
                        if (ie_len + token_len > IEEE_MAX_IE_SIZE) {
                                err = -EINVAL;
index 2fb69a5..c2a685f 100644 (file)
@@ -1328,7 +1328,7 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
 
                case WLAN_EID_CHANNEL_SWITCH:
                        bss_entry->chan_sw_ie_present = true;
-                       /* fall through */
+                       fallthrough;
                case WLAN_EID_PWR_CAPABILITY:
                case WLAN_EID_TPC_REPORT:
                case WLAN_EID_QUIET: