mwifiex: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 17 Nov 2020 16:09:58 +0000 (10:09 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 24 Nov 2020 15:05:56 +0000 (17:05 +0200)
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of
letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201117160958.GA18807@embeddedor
drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
drivers/net/wireless/marvell/mwifiex/sta_event.c
drivers/net/wireless/marvell/mwifiex/uap_cmd.c
drivers/net/wireless/marvell/mwifiex/wmm.c

index 119ccac..6b5d35d 100644 (file)
@@ -201,6 +201,7 @@ static int mwifiex_ret_802_11_snmp_mib(struct mwifiex_private *priv,
                        mwifiex_dbg(priv->adapter, INFO,
                                    "info: SNMP_RESP: DTIM period=%u\n",
                                    ul_temp);
+                       break;
                default:
                        break;
                }
@@ -1393,6 +1394,7 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
                break;
        case HostCmd_CMD_TDLS_OPER:
                ret = mwifiex_ret_tdls_oper(priv, resp);
+               break;
        case HostCmd_CMD_MC_POLICY:
                break;
        case HostCmd_CMD_CHAN_REPORT_REQUEST:
index bc79ca4..68c6326 100644 (file)
@@ -99,6 +99,7 @@ static int mwifiex_check_ibss_peer_capabilities(struct mwifiex_private *priv,
                        case IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895:
                                sta_ptr->max_amsdu =
                                        MWIFIEX_TX_DATA_BUF_SIZE_4K;
+                               break;
                        default:
                                break;
                        }
index b48a85d..18e8977 100644 (file)
@@ -108,6 +108,7 @@ int mwifiex_set_secure_params(struct mwifiex_private *priv,
                        if (params->crypto.wpa_versions & NL80211_WPA_VERSION_2)
                                bss_config->wpa_cfg.pairwise_cipher_wpa2 |=
                                                                CIPHER_AES_CCMP;
+                       break;
                default:
                        break;
                }
index b8f19ca..0b37560 100644 (file)
@@ -1396,6 +1396,7 @@ mwifiex_send_processed_packet(struct mwifiex_private *priv,
                break;
        case 0:
                mwifiex_write_data_complete(adapter, skb, 0, ret);
+               break;
        default:
                break;
        }