Skip to contentSkip to conversation

Mark expected switch fall-throughs

PATCH Superseded Gustavo A. R. Silva 4 participants 26 messages Oct 22, 2018 – Nov 6, 2018

Subsystems (12)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Mark expected switch fall-throughs

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

Thanks!

Gustavo A. R. Silva (20):
ath6kl: Mark expected switch fall-through
ath9k: mark expected switch fall-through
ath9k: ar9002_phy: mark expected switch fall-throughs
ath9k_hw: mark expected switch fall-through
carl9170: rx: mark expected switch fall-through
carl9170: tx: mark expected switch fall-throughs
iwlegacy: 4965-mac: mark expected switch fall-through
iwlegacy: common: mark expected switch fall-throughs
orinoco_usb: mark expected switch fall-through
prism54: isl_38xx: Mark expected switch fall-through
prism54: isl_ioctl: mark expected switch fall-through
prism54: islpci_dev: mark expected switch fall-through
mwifiex: Mark expected switch fall-through
rt2x00: rt2400pci: mark expected switch fall-through
rt2x00: rt2500pci: mark expected switch fall-through
rt2x00: rt2800lib: mark expected switch fall-through
rt2x00: rt61pci: mark expected switch fall-through
ray_cs: mark expected switch fall-throughs
rtlwifi: rtl8821ae: phy: Mark expected switch fall-through
zd1201: mark expected switch fall-through

 drivers/net/wireless/ath/ath6kl/main.c               | 1 +
 drivers/net/wireless/ath/ath9k/ar5008_phy.c          | 2 +-
 drivers/net/wireless/ath/ath9k/ar9002_phy.c          | 2 +-
 drivers/net/wireless/ath/ath9k/hw.c                  | 1 +
 drivers/net/wireless/ath/carl9170/rx.c               | 1 +
 drivers/net/wireless/ath/carl9170/tx.c               | 3 +++
 drivers/net/wireless/intel/iwlegacy/4965-mac.c       | 2 +-
 drivers/net/wireless/intel/iwlegacy/common.c         | 2 ++
 drivers/net/wireless/intersil/orinoco/orinoco_usb.c  | 1 +
 drivers/net/wireless/intersil/prism54/isl_38xx.c     | 1 +
 drivers/net/wireless/intersil/prism54/isl_ioctl.c    | 1 +
 drivers/net/wireless/intersil/prism54/islpci_dev.c   | 1 +
 drivers/net/wireless/marvell/mwifiex/ie.c            | 1 +
 drivers/net/wireless/ralink/rt2x00/rt2400pci.c       | 2 +-
 drivers/net/wireless/ralink/rt2x00/rt2500pci.c       | 2 +-
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c       | 4 ++++
 drivers/net/wireless/ralink/rt2x00/rt61pci.c         | 2 +-
 drivers/net/wireless/ray_cs.c                        | 2 ++
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 1 +
 drivers/net/wireless/zydas/zd1201.c                  | 1 +
 20 files changed, 27 insertions(+), 6 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/20 ath6kl: Mark expected switch fall-through

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

Addresses-Coverity-ID: 201383 ("Missing break in switch")

---
 drivers/net/wireless/ath/ath6kl/main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath6kl/main.c +1 -0
index cb59016..5e7ea83 100644
@@ -389,6 +389,7 @@ void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel)
 		if (!ik->valid || ik->key_type != WAPI_CRYPT)
 			break;
 		/* for WAPI, we need to set the delayed group key, continue: */
+		/* fall through */
 	case WPA_PSK_AUTH:
 	case WPA2_PSK_AUTH:
 	case (WPA_PSK_AUTH | WPA2_PSK_AUTH):
Signature · 1 line
2.7.4
#4 lore raw

PATCH 2/20 ath9k: ar5008_phy: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1056532 ("Missing break in switch")

---
 drivers/net/wireless/ath/ath9k/ar5008_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/ar5008_phy.c +1 -1
index 11d6f975..dae9540 100644
@@ -586,7 +586,7 @@ static void ar5008_hw_init_chain_masks(struct ath_hw *ah)
 			REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, 0x7);
 			break;
 		}
-		/* else: fall through */
+		/* fall through */
 	case 0x1:
 	case 0x2:
 	case 0x7:
Signature · 1 line
2.7.4
#6 lore raw

PATCH 3/20 ath9k: ar9002_phy: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1056532 ("Missing break in switch")

---
 drivers/net/wireless/ath/ath9k/ar9002_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/ar9002_phy.c +1 -1
index 7132918..6f32b8d 100644
@@ -119,7 +119,7 @@ static int ar9002_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
 				aModeRefSel = 2;
 			if (aModeRefSel)
 				break;
-			/* else: fall through */
+			/* fall through */
 		case 1:
 		default:
 			aModeRefSel = 0;
Signature · 1 line
2.7.4
#7 lore raw

PATCH 4/20 ath9k: hw: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1056532 ("Missing break in switch")

---
 drivers/net/wireless/ath/ath9k/hw.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath9k/hw.c +1 -0
index bb319f2..8581d91 100644
@@ -2279,6 +2279,7 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
 	case NL80211_IFTYPE_ADHOC:
 		REG_SET_BIT(ah, AR_TXCFG,
 			    AR_TXCFG_ADHOC_BEACON_ATIM_TX_POLICY);
+		/* fall through */
 	case NL80211_IFTYPE_MESH_POINT:
 	case NL80211_IFTYPE_AP:
 		REG_WRITE(ah, AR_NEXT_TBTT_TIMER, next_beacon);
Signature · 1 line
2.7.4
#8 lore raw

PATCH 5/20 carl9170: rx: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1056534 ("Missing break in switch")

---
 drivers/net/wireless/ath/carl9170/rx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/carl9170/rx.c +1 -0
index 7050632..f7c2f19 100644
@@ -766,6 +766,7 @@ static void carl9170_rx_untie_data(struct ar9170 *ar, u8 *buf, int len)
 
 			goto drop;
 		}
+		/* fall through */
 
 	case AR9170_RX_STATUS_MPDU_MIDDLE:
 		/*  These are just data + mac status */
Signature · 1 line
2.7.4
#9 lore raw

PATCH 6/20 carl9170: tx: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/ath/carl9170/tx.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/carl9170/tx.c +3 -0
index 8c75651..2407931 100644
@@ -830,10 +830,12 @@ static bool carl9170_tx_rts_check(struct ar9170 *ar,
 	case CARL9170_ERP_AUTO:
 		if (ampdu)
 			break;
+		/* fall through */
 
 	case CARL9170_ERP_MAC80211:
 		if (!(rate->flags & IEEE80211_TX_RC_USE_RTS_CTS))
 			break;
+		/* fall through */
 
 	case CARL9170_ERP_RTS:
 		if (likely(!multi))
@@ -854,6 +856,7 @@ static bool carl9170_tx_cts_check(struct ar9170 *ar,
 	case CARL9170_ERP_MAC80211:
 		if (!(rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT))
 			break;
+		/* fall through */
 
 	case CARL9170_ERP_CTS:
 		return true;
Signature · 1 line
2.7.4
#10 lore raw

PATCH 7/20 iwlegacy: 4965-mac: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlegacy/4965-mac.c +1 -1
index 280cd8a..6b4488a 100644
@@ -559,7 +559,7 @@ il4965_translate_rx_status(struct il_priv *il, u32 decrypt_in)
 			decrypt_out |= RX_RES_STATUS_BAD_KEY_TTAK;
 			break;
 		}
-		/* fall through if TTAK OK */
+		/* fall through - if TTAK OK */
 	default:
 		if (!(decrypt_in & RX_MPDU_RES_STATUS_ICV_OK))
 			decrypt_out |= RX_RES_STATUS_BAD_ICV_MIC;
Signature · 1 line
2.7.4
#12 lore raw

PATCH 8/20 iwlegacy: common: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 201384 ("Missing break in switch")

---
 drivers/net/wireless/intel/iwlegacy/common.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/intel/iwlegacy/common.c +2 -0
index 6514baf..a2f86cb 100644
@@ -2695,6 +2695,7 @@ il_set_decrypted_flag(struct il_priv *il, struct ieee80211_hdr *hdr,
 		if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) ==
 		    RX_RES_STATUS_BAD_KEY_TTAK)
 			break;
+		/* fall through */
 
 	case RX_RES_STATUS_SEC_TYPE_WEP:
 		if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) ==
@@ -2704,6 +2705,7 @@ il_set_decrypted_flag(struct il_priv *il, struct ieee80211_hdr *hdr,
 			D_RX("Packet destroyed\n");
 			return -1;
 		}
+		/* fall through */
 	case RX_RES_STATUS_SEC_TYPE_CCMP:
 		if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) ==
 		    RX_RES_STATUS_DECRYPT_OK) {
Signature · 1 line
2.7.4
#13 lore raw

PATCH 9/20 orinoco_usb: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/intersil/orinoco/orinoco_usb.c +1 -0
index 21bb684..40a8b941 100644
@@ -908,6 +908,7 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
 	case EZUSB_CTX_REQ_SUBMITTED:
 		if (!ctx->in_rid)
 			break;
+		/* fall through */
 	default:
 		err("%s: Unexpected context state %d", __func__,
 		    state);
Signature · 1 line
2.7.4
#14 lore raw

PATCH 10/20 prism54: isl_38xx: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114944 ("Missing break in switch")

---
 drivers/net/wireless/intersil/prism54/isl_38xx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/intersil/prism54/isl_38xx.c +1 -0
index ce9d4db..b0eb58a 100644
@@ -235,6 +235,7 @@ isl38xx_in_queue(isl38xx_control_block *cb, int queue)
 		/* send queues */
 	case ISL38XX_CB_TX_MGMTQ:
 		BUG_ON(delta > ISL38XX_CB_MGMT_QSIZE);
+		/* fall through */
 
 	case ISL38XX_CB_TX_DATA_LQ:
 	case ISL38XX_CB_TX_DATA_HQ:
Signature · 1 line
2.7.4
#15 lore raw

PATCH 11/20 prism54: isl_ioctl: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/intersil/prism54/isl_ioctl.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/intersil/prism54/isl_ioctl.c +1 -0
index 334717b0..3ccf2a4 100644
@@ -1691,6 +1691,7 @@ static int prism54_get_encodeext(struct net_device *ndev,
 	case DOT11_AUTH_BOTH:
 	case DOT11_AUTH_SK:
 		wrqu->encoding.flags |= IW_ENCODE_RESTRICTED;
+		/* fall through */
 	case DOT11_AUTH_OS:
 	default:
 		wrqu->encoding.flags |= IW_ENCODE_OPEN;
Signature · 1 line
2.7.4
#16 lore raw

PATCH 12/20 prism54: islpci_dev: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114947 ("Missing break in switch")

---
 drivers/net/wireless/intersil/prism54/islpci_dev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/intersil/prism54/islpci_dev.c +1 -0
index 325176d..ad6d3a5 100644
@@ -932,6 +932,7 @@ islpci_set_state(islpci_private *priv, islpci_state_t new_state)
 	switch (new_state) {
 	case PRV_STATE_OFF:
 		priv->state_off++;
+		/* fall through */
 	default:
 		priv->state = new_state;
 		break;
Signature · 1 line
2.7.4
#17 lore raw

PATCH 13/20 mwifiex: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/marvell/mwifiex/ie.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/marvell/mwifiex/ie.c +1 -0
index 75cbd60..6845eb5 100644
@@ -363,6 +363,7 @@ static int mwifiex_uap_parse_tail_ies(struct mwifiex_private *priv,
 						    (const u8 *)hdr,
 						    hdr->len + sizeof(struct ieee_types_header)))
 				break;
+			/* fall through */
 		default:
 			memcpy(gen_ie->ie_buffer + ie_len, hdr,
 			       hdr->len + sizeof(struct ieee_types_header));
Signature · 1 line
2.7.4
#18 lore raw

PATCH 14/20 rt2x00: rt2400pci: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ralink/rt2x00/rt2400pci.c +1 -1
index 0bc8b02..49a7327 100644
@@ -1302,7 +1302,7 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev,
 			break;
 		case 2: /* Failure, excessive retries */
 			__set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags);
-			/* Don't break, this is a failed frame! */
+			/* Fall through - this is a failed frame! */
 		default: /* Failure */
 			__set_bit(TXDONE_FAILURE, &txdesc.flags);
 		}
Signature · 1 line
2.7.4
#19 lore raw

PATCH 15/20 rt2x00: rt2500pci: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ralink/rt2x00/rt2500pci.c +1 -1
index 1ff5434..e8e7bfe 100644
@@ -1430,7 +1430,7 @@ static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev,
 			break;
 		case 2: /* Failure, excessive retries */
 			__set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags);
-			/* Don't break, this is a failed frame! */
+			/* Fall through - this is a failed frame! */
 		default: /* Failure */
 			__set_bit(TXDONE_FAILURE, &txdesc.flags);
 		}
Signature · 1 line
2.7.4
#20 lore raw

PATCH 16/20 rt2x00: rt2800lib: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 145198 ("Missing break in switch")

---
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/wireless/ralink/rt2x00/rt2800lib.c +4 -0
index 9e7b893..0e95555 100644
@@ -2482,6 +2482,7 @@ static void rt2800_config_channel_rf3052(struct rt2x00_dev *rt2x00dev,
 		switch (rt2x00dev->default_ant.tx_chain_num) {
 		case 1:
 			rt2x00_set_field8(&rfcsr, RFCSR1_TX1_PD, 1);
+			/* fall through */
 		case 2:
 			rt2x00_set_field8(&rfcsr, RFCSR1_TX2_PD, 1);
 			break;
@@ -2490,6 +2491,7 @@ static void rt2800_config_channel_rf3052(struct rt2x00_dev *rt2x00dev,
 		switch (rt2x00dev->default_ant.rx_chain_num) {
 		case 1:
 			rt2x00_set_field8(&rfcsr, RFCSR1_RX1_PD, 1);
+			/* fall through */
 		case 2:
 			rt2x00_set_field8(&rfcsr, RFCSR1_RX2_PD, 1);
 			break;
@@ -9457,8 +9459,10 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	switch (rx_chains) {
 	case 3:
 		spec->ht.mcs.rx_mask[2] = 0xff;
+		/* fall through */
 	case 2:
 		spec->ht.mcs.rx_mask[1] = 0xff;
+		/* fall through */
 	case 1:
 		spec->ht.mcs.rx_mask[0] = 0xff;
 		spec->ht.mcs.rx_mask[4] = 0x1; /* MCS32 */
Signature · 1 line
2.7.4
#21 lore raw

PATCH 17/20 rt2x00: rt61pci: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/ralink/rt2x00/rt61pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ralink/rt2x00/rt61pci.c +1 -1
index cb0e119..4c5de8f 100644
@@ -2226,7 +2226,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
 			break;
 		case 6: /* Failure, excessive retries */
 			__set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags);
-			/* Don't break, this is a failed frame! */
+			/* Fall through - this is a failed frame! */
 		default: /* Failure */
 			__set_bit(TXDONE_FAILURE, &txdesc.flags);
 		}
Signature · 1 line
2.7.4
#22 lore raw

PATCH 18/20 ray_cs: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114948 ("Missing break in switch")
Addresses-Coverity-ID: 114949 ("Missing break in switch")

---
 drivers/net/wireless/ray_cs.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/ray_cs.c +2 -0
index 08c607c..33ad875 100644
@@ -889,8 +889,10 @@ static int ray_hw_xmit(unsigned char *data, int len, struct net_device *dev,
 	switch (ccsindex = get_free_tx_ccs(local)) {
 	case ECCSBUSY:
 		pr_debug("ray_hw_xmit tx_ccs table busy\n");
+		/* fall through */
 	case ECCSFULL:
 		pr_debug("ray_hw_xmit No free tx ccs\n");
+		/* fall through */
 	case ECARDGONE:
 		netif_stop_queue(dev);
 		return XMIT_NO_CCS;
Signature · 1 line
2.7.4
#23 lore raw

PATCH 19/20 rtlwifi: rtl8821ae: phy: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +1 -0
index 176deb2..a75451c 100644
@@ -394,6 +394,7 @@ static void _rtl8812ae_phy_set_rfe_reg_24g(struct ieee80211_hw *hw)
 			rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000);
 			break;
 		}
+		/* fall through */
 	case 0:
 	case 2:
 	default:
Signature · 1 line
2.7.4
#25 lore raw

PATCH 20/20 zd1201: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/net/wireless/zydas/zd1201.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/zydas/zd1201.c +1 -0
index 2534038..22c70f1 100644
@@ -969,6 +969,7 @@ static int zd1201_set_mode(struct net_device *dev,
 			 */
 			zd1201_join(zd, "\0-*#\0", 5);
 			/* Put port in pIBSS */
+			/* Fall through */
 		case 8: /* No pseudo-IBSS in wireless extensions (yet) */
 			porttype = ZD1201_PORTTYPE_PSEUDOIBSS;
 			break;
Signature · 1 line
2.7.4
Acked-by on v1 1/20
#2 lore raw

Re: [PATCH 01/20] ath6kl: Mark expected switch fall-through

In reply to Gustavo A. R. Silva
Quoted 23 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 201383 ("Missing break in switch")

---
 drivers/net/wireless/ath/ath6kl/main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath6kl/main.c +1 -1
index cb59016..5e7ea83 100644
@@ -389,6 +389,7 @@ void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel)
                if (!ik->valid || ik->key_type != WAPI_CRYPT)
                        break;
                /* for WAPI, we need to set the delayed group key, continue: */
+               /* fall through */
        case WPA_PSK_AUTH:
        case WPA2_PSK_AUTH:
        case (WPA_PSK_AUTH | WPA2_PSK_AUTH):
--
Quoted 2 lines

2.7.4

Looks fine to me. Though it's too bad that the compiler can't detect the fall through as already clearly commented.

- Steve

maintainer Acked-by on v1 19/20
#24 lore raw

Re: [PATCH 19/20] rtlwifi: rtl8821ae: phy: Mark expected switch fall-through

In reply to Gustavo A. R. Silva
Quoted 19 lines · Gustavo A. R. Silva

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

---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 1 +

 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +1 -0
index 176deb2..a75451c 100644
@@ -394,6 +394,7 @@ static void _rtl8812ae_phy_set_rfe_reg_24g(struct
 ieee80211_hw *hw)
  			rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000);
  			break;
  		}
+		/* fall through */
Quoted 3 lines

  case 0:
  case 2:
  default:

If BT isn't coexisting in the case 1, the settings will be the same as case 0/2.

#5 lore raw

Re: [PATCH 02/20] ath9k: ar5008_phy: mark expected switch fall-through

In reply to Gustavo A. R. Silva
Quoted 6 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1056532 ("Missing break in switch")

3 patches applied to ath-next branch of ath.git, thanks.

604e98670072 ath9k: ar5008_phy: mark expected switch fall-through f2a881055094 ath9k: ar9002_phy: mark expected switch fall-throughs bf74fd75137d ath9k: hw: mark expected switch fall-through

Signature · 3 lines
https://patchwork.kernel.org/patch/10652551/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#3 lore raw

Re: [PATCH 01/20] ath6kl: Mark expected switch fall-through

In reply to Gustavo A. R. Silva
Quoted 7 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 201383 ("Missing break in switch")

3 patches applied to ath-next branch of ath.git, thanks.

6d9e1ecd1537 ath6kl: Mark expected switch fall-through 003161445bc8 carl9170: rx: mark expected switch fall-through f458f9f43690 carl9170: tx: mark expected switch fall-throughs

Signature · 3 lines
https://patchwork.kernel.org/patch/10652473/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#11 lore raw

Re: [PATCH 07/20] iwlegacy: 4965-mac: mark expected switch fall-through

In reply to Gustavo A. R. Silva
Quoted 4 lines · Gustavo A. R. Silva

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

14 patches applied to wireless-drivers-next.git, thanks.

e9904084dd1b iwlegacy: 4965-mac: mark expected switch fall-through af71f8fef45c iwlegacy: common: mark expected switch fall-throughs d56b26801e1d orinoco_usb: mark expected switch fall-through d22b8fadd08e prism54: isl_38xx: Mark expected switch fall-through 3d238b9d5048 prism54: isl_ioctl: mark expected switch fall-through 38a0792d08e9 prism54: islpci_dev: mark expected switch fall-through 63fdc952df36 mwifiex: Mark expected switch fall-through 6eba8fd22352 rt2x00: rt2400pci: mark expected switch fall-through 10bb92217747 rt2x00: rt2500pci: mark expected switch fall-through 916e6bbcfcff rt2x00: rt2800lib: mark expected switch fall-throughs 641dd8068ecb rt2x00: rt61pci: mark expected switch fall-through d22d2492a35d ray_cs: mark expected switch fall-throughs 89e54fa4562e rtlwifi: rtl8821ae: phy: Mark expected switch fall-through 7cbbe1597e44 zd1201: mark expected switch fall-through

Signature · 3 lines
https://patchwork.kernel.org/patch/10652563/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches