OSDN Git Service

rtlwifi: mark expected switch fall-through in rtl_make_smps_action
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Fri, 29 Dec 2017 08:31:07 +0000 (16:31 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 8 Jan 2018 17:07:43 +0000 (19:07 +0200)
This is merged by Ping-Ke Shih from commit 640019bba419 ("staging:
rtlwifi: mark expected switch fall-through in rtl_make_smps_action"),
and original commit log is reserved below.

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/base.c

index 2052e0e..c01c5ca 100644 (file)
@@ -2229,9 +2229,7 @@ static struct sk_buff *rtl_make_smps_action(struct ieee80211_hw *hw,
        case IEEE80211_SMPS_AUTOMATIC:/* 0 */
        case IEEE80211_SMPS_NUM_MODES:/* 4 */
                WARN_ON(1);
-       /* Here will get a 'MISSING_BREAK' in Coverity Test, just ignore it.
-        * According to Kernel Code, here is right.
-        */
+       /* fall through */
        case IEEE80211_SMPS_OFF:/* 1 */ /*MIMO_PS_NOLIMIT*/
                action_frame->u.action.u.ht_smps.smps_control =
                                WLAN_HT_SMPS_CONTROL_DISABLED;/* 0 */