Commit bf3365a8 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kalle Valo

rtl8xxxu: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix
multiple warnings by replacing /* fall through */ comments with
the new pseudo-keyword macro fallthrough; instead of letting the
code fall through to the next case.

Notice that Clang doesn't recognize /* fall through */ comments as
implicit fall-through markings.

Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210305094850.GA141221@embeddedor
parent a381b78a
...@@ -1145,7 +1145,7 @@ void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw) ...@@ -1145,7 +1145,7 @@ void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw)
switch (hw->conf.chandef.width) { switch (hw->conf.chandef.width) {
case NL80211_CHAN_WIDTH_20_NOHT: case NL80211_CHAN_WIDTH_20_NOHT:
ht = false; ht = false;
/* fall through */ fallthrough;
case NL80211_CHAN_WIDTH_20: case NL80211_CHAN_WIDTH_20:
opmode |= BW_OPMODE_20MHZ; opmode |= BW_OPMODE_20MHZ;
rtl8xxxu_write8(priv, REG_BW_OPMODE, opmode); rtl8xxxu_write8(priv, REG_BW_OPMODE, opmode);
...@@ -1272,7 +1272,7 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw) ...@@ -1272,7 +1272,7 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
switch (hw->conf.chandef.width) { switch (hw->conf.chandef.width) {
case NL80211_CHAN_WIDTH_20_NOHT: case NL80211_CHAN_WIDTH_20_NOHT:
ht = false; ht = false;
/* fall through */ fallthrough;
case NL80211_CHAN_WIDTH_20: case NL80211_CHAN_WIDTH_20:
rf_mode_bw |= WMAC_TRXPTCL_CTL_BW_20; rf_mode_bw |= WMAC_TRXPTCL_CTL_BW_20;
subchannel = 0; subchannel = 0;
...@@ -1741,11 +1741,11 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv) ...@@ -1741,11 +1741,11 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)
case 3: case 3:
priv->ep_tx_low_queue = 1; priv->ep_tx_low_queue = 1;
priv->ep_tx_count++; priv->ep_tx_count++;
/* fall through */ fallthrough;
case 2: case 2:
priv->ep_tx_normal_queue = 1; priv->ep_tx_normal_queue = 1;
priv->ep_tx_count++; priv->ep_tx_count++;
/* fall through */ fallthrough;
case 1: case 1:
priv->ep_tx_high_queue = 1; priv->ep_tx_high_queue = 1;
priv->ep_tx_count++; priv->ep_tx_count++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment