linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/20] Mark expected switch fall-throughs
@ 2018-10-22 20:37 Gustavo A. R. Silva
  2018-10-22 20:37 ` [PATCH 01/20] ath6kl: Mark expected switch fall-through Gustavo A. R. Silva
                   ` (19 more replies)
  0 siblings, 20 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:37 UTC (permalink / raw)
  To: QCA ath9k Development, Christian Lamparter, Stanislaw Gruszka,
	Luis R. Rodriguez, Amitkumar Karwar, Nishant Sarmukadam,
	Ganapathi Bhat, Xinming Hu, Helmut Schaa, Ping-Ke Shih
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva, Kees Cook

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(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 01/20] ath6kl: Mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-10-22 20:37 ` Gustavo A. R. Silva
  2018-10-22 21:11   ` Steve deRosier
  2018-11-05 11:23   ` Kalle Valo
  2018-10-22 20:37 ` [PATCH 02/20] ath9k: ar5008_phy: mark " Gustavo A. R. Silva
                   ` (18 subsequent siblings)
  19 siblings, 2 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:37 UTC (permalink / raw)
  To: QCA ath9k Development
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ath/ath6kl/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index cb59016..5e7ea83 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -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):
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 02/20] ath9k: ar5008_phy: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
  2018-10-22 20:37 ` [PATCH 01/20] ath6kl: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-22 20:37 ` Gustavo A. R. Silva
  2018-11-05 11:16   ` Kalle Valo
  2018-10-22 20:38 ` [PATCH 03/20] ath9k: ar9002_phy: mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (17 subsequent siblings)
  19 siblings, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:37 UTC (permalink / raw)
  To: QCA ath9k Development
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ath/ath9k/ar5008_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index 11d6f975..dae9540 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -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:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 03/20] ath9k: ar9002_phy: mark expected switch fall-throughs
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
  2018-10-22 20:37 ` [PATCH 01/20] ath6kl: Mark expected switch fall-through Gustavo A. R. Silva
  2018-10-22 20:37 ` [PATCH 02/20] ath9k: ar5008_phy: mark " Gustavo A. R. Silva
@ 2018-10-22 20:38 ` Gustavo A. R. Silva
  2018-10-22 20:39 ` [PATCH 04/20] ath9k: hw: mark expected switch fall-through Gustavo A. R. Silva
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:38 UTC (permalink / raw)
  To: QCA ath9k Development
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ath/ath9k/ar9002_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.c b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
index 7132918..6f32b8d 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
@@ -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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 04/20] ath9k: hw: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (2 preceding siblings ...)
  2018-10-22 20:38 ` [PATCH 03/20] ath9k: ar9002_phy: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-10-22 20:39 ` Gustavo A. R. Silva
  2018-10-22 20:39 ` [PATCH 05/20] carl9170: rx: " Gustavo A. R. Silva
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:39 UTC (permalink / raw)
  To: QCA ath9k Development
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ath/ath9k/hw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index bb319f2..8581d91 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -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);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 05/20] carl9170: rx: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (3 preceding siblings ...)
  2018-10-22 20:39 ` [PATCH 04/20] ath9k: hw: mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-22 20:39 ` Gustavo A. R. Silva
  2018-10-22 20:40 ` [PATCH 06/20] carl9170: tx: mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:39 UTC (permalink / raw)
  To: Christian Lamparter
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ath/carl9170/rx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c
index 7050632..f7c2f19 100644
--- a/drivers/net/wireless/ath/carl9170/rx.c
+++ b/drivers/net/wireless/ath/carl9170/rx.c
@@ -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 */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 06/20] carl9170: tx: mark expected switch fall-throughs
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (4 preceding siblings ...)
  2018-10-22 20:39 ` [PATCH 05/20] carl9170: rx: " Gustavo A. R. Silva
@ 2018-10-22 20:40 ` Gustavo A. R. Silva
  2018-10-22 20:40 ` [PATCH 07/20] iwlegacy: 4965-mac: mark expected switch fall-through Gustavo A. R. Silva
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:40 UTC (permalink / raw)
  To: Christian Lamparter
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/net/wireless/ath/carl9170/tx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 8c75651..2407931 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 07/20] iwlegacy: 4965-mac: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (5 preceding siblings ...)
  2018-10-22 20:40 ` [PATCH 06/20] carl9170: tx: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-10-22 20:40 ` Gustavo A. R. Silva
  2018-11-06 17:00   ` Kalle Valo
  2018-10-22 20:41 ` [PATCH 08/20] iwlegacy: common: mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (12 subsequent siblings)
  19 siblings, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:40 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
index 280cd8a..6b4488a 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
@@ -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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 08/20] iwlegacy: common: mark expected switch fall-throughs
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (6 preceding siblings ...)
  2018-10-22 20:40 ` [PATCH 07/20] iwlegacy: 4965-mac: mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-22 20:41 ` Gustavo A. R. Silva
  2018-10-22 20:42 ` [PATCH 09/20] orinoco_usb: mark expected switch fall-through Gustavo A. R. Silva
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:41 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/intel/iwlegacy/common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index 6514baf..a2f86cb 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -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) {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 09/20] orinoco_usb: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (7 preceding siblings ...)
  2018-10-22 20:41 ` [PATCH 08/20] iwlegacy: common: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-10-22 20:42 ` Gustavo A. R. Silva
  2018-10-22 20:42 ` [PATCH 10/20] prism54: isl_38xx: Mark " Gustavo A. R. Silva
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:42 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-wireless, David S. Miller, netdev, linux-kernel,
	Gustavo A. R. Silva

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>
---
 drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
index 21bb684..40a8b941 100644
--- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
@@ -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);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 10/20] prism54: isl_38xx: Mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (8 preceding siblings ...)
  2018-10-22 20:42 ` [PATCH 09/20] orinoco_usb: mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-22 20:42 ` Gustavo A. R. Silva
  2018-10-22 20:42 ` [PATCH 11/20] prism54: isl_ioctl: mark " Gustavo A. R. Silva
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:42 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/intersil/prism54/isl_38xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intersil/prism54/isl_38xx.c b/drivers/net/wireless/intersil/prism54/isl_38xx.c
index ce9d4db..b0eb58a 100644
--- a/drivers/net/wireless/intersil/prism54/isl_38xx.c
+++ b/drivers/net/wireless/intersil/prism54/isl_38xx.c
@@ -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:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 11/20] prism54: isl_ioctl: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (9 preceding siblings ...)
  2018-10-22 20:42 ` [PATCH 10/20] prism54: isl_38xx: Mark " Gustavo A. R. Silva
@ 2018-10-22 20:42 ` Gustavo A. R. Silva
  2018-10-22 20:43 ` [PATCH 12/20] prism54: islpci_dev: " Gustavo A. R. Silva
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:42 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/net/wireless/intersil/prism54/isl_ioctl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intersil/prism54/isl_ioctl.c b/drivers/net/wireless/intersil/prism54/isl_ioctl.c
index 334717b0..3ccf2a4 100644
--- a/drivers/net/wireless/intersil/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/intersil/prism54/isl_ioctl.c
@@ -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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 12/20] prism54: islpci_dev: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (10 preceding siblings ...)
  2018-10-22 20:42 ` [PATCH 11/20] prism54: isl_ioctl: mark " Gustavo A. R. Silva
@ 2018-10-22 20:43 ` Gustavo A. R. Silva
  2018-10-22 20:43 ` [PATCH 13/20] mwifiex: Mark " Gustavo A. R. Silva
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:43 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/intersil/prism54/islpci_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intersil/prism54/islpci_dev.c b/drivers/net/wireless/intersil/prism54/islpci_dev.c
index 325176d..ad6d3a5 100644
--- a/drivers/net/wireless/intersil/prism54/islpci_dev.c
+++ b/drivers/net/wireless/intersil/prism54/islpci_dev.c
@@ -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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 13/20] mwifiex: Mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (11 preceding siblings ...)
  2018-10-22 20:43 ` [PATCH 12/20] prism54: islpci_dev: " Gustavo A. R. Silva
@ 2018-10-22 20:43 ` Gustavo A. R. Silva
  2018-10-22 20:44 ` [PATCH 14/20] rt2x00: rt2400pci: mark " Gustavo A. R. Silva
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:43 UTC (permalink / raw)
  To: Amitkumar Karwar, Nishant Sarmukadam, Ganapathi Bhat, Xinming Hu
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/net/wireless/marvell/mwifiex/ie.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/ie.c b/drivers/net/wireless/marvell/mwifiex/ie.c
index 75cbd60..6845eb5 100644
--- a/drivers/net/wireless/marvell/mwifiex/ie.c
+++ b/drivers/net/wireless/marvell/mwifiex/ie.c
@@ -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));
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 14/20] rt2x00: rt2400pci: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (12 preceding siblings ...)
  2018-10-22 20:43 ` [PATCH 13/20] mwifiex: Mark " Gustavo A. R. Silva
@ 2018-10-22 20:44 ` Gustavo A. R. Silva
  2018-10-22 20:45 ` [PATCH 15/20] rt2x00: rt2500pci: " Gustavo A. R. Silva
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:44 UTC (permalink / raw)
  To: Stanislaw Gruszka, Helmut Schaa
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
index 0bc8b02..49a7327 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
@@ -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);
 		}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 15/20] rt2x00: rt2500pci: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (13 preceding siblings ...)
  2018-10-22 20:44 ` [PATCH 14/20] rt2x00: rt2400pci: mark " Gustavo A. R. Silva
@ 2018-10-22 20:45 ` Gustavo A. R. Silva
  2018-10-22 20:46 ` [PATCH 16/20] rt2x00: rt2800lib: mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:45 UTC (permalink / raw)
  To: Stanislaw Gruszka, Helmut Schaa
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
index 1ff5434..e8e7bfe 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
@@ -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);
 		}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 16/20] rt2x00: rt2800lib: mark expected switch fall-throughs
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (14 preceding siblings ...)
  2018-10-22 20:45 ` [PATCH 15/20] rt2x00: rt2500pci: " Gustavo A. R. Silva
@ 2018-10-22 20:46 ` Gustavo A. R. Silva
  2018-10-22 20:46 ` [PATCH 17/20] rt2x00: rt61pci: mark expected switch fall-through Gustavo A. R. Silva
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:46 UTC (permalink / raw)
  To: Stanislaw Gruszka, Helmut Schaa
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index 9e7b893..0e95555 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -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 */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 17/20] rt2x00: rt61pci: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (15 preceding siblings ...)
  2018-10-22 20:46 ` [PATCH 16/20] rt2x00: rt2800lib: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-10-22 20:46 ` Gustavo A. R. Silva
  2018-10-22 20:47 ` [PATCH 18/20] ray_cs: mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:46 UTC (permalink / raw)
  To: Stanislaw Gruszka, Helmut Schaa
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/net/wireless/ralink/rt2x00/rt61pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt61pci.c b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
index cb0e119..4c5de8f 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
@@ -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);
 		}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 18/20] ray_cs: mark expected switch fall-throughs
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (16 preceding siblings ...)
  2018-10-22 20:46 ` [PATCH 17/20] rt2x00: rt61pci: mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-22 20:47 ` Gustavo A. R. Silva
  2018-10-22 20:47 ` [PATCH 19/20] rtlwifi: rtl8821ae: phy: Mark expected switch fall-through Gustavo A. R. Silva
  2018-10-22 20:48 ` [PATCH 20/20] zd1201: mark " Gustavo A. R. Silva
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:47 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-wireless, David S. Miller, netdev, linux-kernel,
	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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ray_cs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 08c607c..33ad875 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 19/20] rtlwifi: rtl8821ae: phy: Mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (17 preceding siblings ...)
  2018-10-22 20:47 ` [PATCH 18/20] ray_cs: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-10-22 20:47 ` Gustavo A. R. Silva
  2018-10-23  1:24   ` Pkshih
  2018-10-22 20:48 ` [PATCH 20/20] zd1201: mark " Gustavo A. R. Silva
  19 siblings, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:47 UTC (permalink / raw)
  To: Ping-Ke Shih
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
index 176deb2..a75451c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
@@ -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:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 20/20] zd1201: mark expected switch fall-through
  2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (18 preceding siblings ...)
  2018-10-22 20:47 ` [PATCH 19/20] rtlwifi: rtl8821ae: phy: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-22 20:48 ` Gustavo A. R. Silva
  19 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:48 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/net/wireless/zydas/zd1201.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/zydas/zd1201.c b/drivers/net/wireless/zydas/zd1201.c
index 2534038..22c70f1 100644
--- a/drivers/net/wireless/zydas/zd1201.c
+++ b/drivers/net/wireless/zydas/zd1201.c
@@ -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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 01/20] ath6kl: Mark expected switch fall-through
  2018-10-22 20:37 ` [PATCH 01/20] ath6kl: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-22 21:11   ` Steve deRosier
  2018-11-05 11:23   ` Kalle Valo
  1 sibling, 0 replies; 28+ messages in thread
From: Steve deRosier @ 2018-10-22 21:11 UTC (permalink / raw)
  To: gustavo
  Cc: ath9k-devel, Kalle Valo, linux-wireless, davem,
	Network Development, LKML

On Mon, Oct 22, 2018 at 1:37 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 201383 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/net/wireless/ath/ath6kl/main.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
> index cb59016..5e7ea83 100644
> --- a/drivers/net/wireless/ath/ath6kl/main.c
> +++ b/drivers/net/wireless/ath/ath6kl/main.c
> @@ -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):
> --
> 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.

Acked-by: Steve deRosier <derosier@cal-sierra.com>

- Steve

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 19/20] rtlwifi: rtl8821ae: phy: Mark expected switch fall-through
  2018-10-22 20:47 ` [PATCH 19/20] rtlwifi: rtl8821ae: phy: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-23  1:24   ` Pkshih
  0 siblings, 0 replies; 28+ messages in thread
From: Pkshih @ 2018-10-23  1:24 UTC (permalink / raw)
  To: gustavo; +Cc: linux-wireless, kvalo, davem, netdev, linux-kernel

On Mon, 2018-10-22 at 22:47 +0200, Gustavo A. R. Silva wrote:
> 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>
> ---
>  drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> index 176deb2..a75451c 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> @@ -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:

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

Acked-by: Ping-Ke Shih <pkshih@realtek.com>



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 02/20] ath9k: ar5008_phy: mark expected switch fall-through
  2018-10-22 20:37 ` [PATCH 02/20] ath9k: ar5008_phy: mark " Gustavo A. R. Silva
@ 2018-11-05 11:16   ` Kalle Valo
  0 siblings, 0 replies; 28+ messages in thread
From: Kalle Valo @ 2018-11-05 11:16 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: QCA ath9k Development, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 1056532 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

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

-- 
https://patchwork.kernel.org/patch/10652551/

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


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 01/20] ath6kl: Mark expected switch fall-through
  2018-10-22 20:37 ` [PATCH 01/20] ath6kl: Mark expected switch fall-through Gustavo A. R. Silva
  2018-10-22 21:11   ` Steve deRosier
@ 2018-11-05 11:23   ` Kalle Valo
  1 sibling, 0 replies; 28+ messages in thread
From: Kalle Valo @ 2018-11-05 11:23 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: QCA ath9k Development, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 201383 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Acked-by: Steve deRosier <derosier@cal-sierra.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

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

-- 
https://patchwork.kernel.org/patch/10652473/

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


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 07/20] iwlegacy: 4965-mac: mark expected switch fall-through
  2018-10-22 20:40 ` [PATCH 07/20] iwlegacy: 4965-mac: mark expected switch fall-through Gustavo A. R. Silva
@ 2018-11-06 17:00   ` Kalle Valo
  0 siblings, 0 replies; 28+ messages in thread
From: Kalle Valo @ 2018-11-06 17:00 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Stanislaw Gruszka, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva

"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:

> 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>

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

-- 
https://patchwork.kernel.org/patch/10652563/

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


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 00/20] mark expected switch fall-throughs
  2017-10-12 16:15 [PATCH 00/20] mark expected switch fall-throughs Gustavo A. R. Silva
@ 2017-10-23 19:33 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-23 19:33 UTC (permalink / raw)
  To: linux-rpi-kernel, linux-arm-kernel, lustre-devel, devel, linux-kernel
  Cc: Oleg Drokin, Andreas Dilger, James Simmons, Greg Kroah-Hartman,
	Ian Abbott, H Hartley Sweeten, Eric Anholt, Stefan Wahren,
	Forest Bond


Quoting "Gustavo A. R. Silva" <garsilva@embeddedor.com>:

> In preparation to enabling -Wimplicit-fallthrough, this patchset aims
> to mark switch cases where we are expecting to fall through.
>
> In Kees Cook words:
> "This is an unfortunate omission in the C language, and thankfully both
> gcc and clang have stepped up to solve this the same way static
> analyzers have solved it. It does both document the intention for
> humans and provide a way for analyzers to report issues.
>
> Having the compiler help us not make mistakes is quite handy."
>
> In some cases there were "no break" or "fall thru" comments already
> in place. So I replaced them with proper "fall through" comments, which
> is what GCC is expecting to find.
>
> For the rest of the cases, please double check if the actual intention
> of the code is to fall through.
>
> Thanks!
>
> Gustavo A. R. Silva (20):
>   staging: ks7010: ks_wlan_net: mark expected switch fall-throughs
>   staging: lustre: lnet: socklnd: mark expected switch fall-through
>   staging: rtl8192e: mark expected switch fall-through
>   staging: rtl8723bs: rtw_mlme_ext: mark expected switch fall-through
>   staging: lustre: lnet: net_fault: mark expected switch fall-through
>   staging: comedi: s526: mark expected switch fall-through
>   staging: rtl8188eu: usb_halinit: mark expected switch fall-through
>   staging: vc04_services: vchiq_core: mark expected switch fall-through
>   staging: vt6656: card: mark expected switch fall-throughs
>   staging: rtl8188eu: usb_ops_linux: mark expected switch fall-through
>   staging: r8822be: mark expected switch fall-throughs
>   staging: lustre: lnet: selftest: mark expected switch fall-through
>   staging: rtlwifi: halmac: mark expected switch fall-through
>   staging: lustre: lnet: selftest: mark expected switch fall-throughs
>   staging: lustre: llite: mark expected switch fall-through
>   staging: lustre: lprocfs: mark expected switch fall-throughs
>   staging: lustre: ldlm: mark expected switch fall-through
>   staging: lustre: osc: mark expected switch fall-through
>   staging: lustre: ptlrpc: mark expected switch fall-throughs
>   staging: lustre: rpc: mark expected switch fall-throughs
>
>  drivers/staging/comedi/drivers/s526.c                       |  5 ++---
>  drivers/staging/ks7010/ks_wlan_net.c                        | 10 ++++++++++
>  drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c         |  2 +-
>  drivers/staging/lustre/lnet/lnet/net_fault.c                |  1 +
>  drivers/staging/lustre/lnet/selftest/conctl.c               |  1 +
>  drivers/staging/lustre/lnet/selftest/module.c               |  5 ++++-
>  drivers/staging/lustre/lnet/selftest/rpc.c                  | 13  
> +++++++++----
>  drivers/staging/lustre/lustre/ldlm/ldlm_request.c           |  1 +
>  drivers/staging/lustre/lustre/llite/namei.c                 |  4 +++-
>  drivers/staging/lustre/lustre/obdclass/lprocfs_status.c     |  4 ++++
>  drivers/staging/lustre/lustre/osc/osc_cache.c               |  1 +
>  drivers/staging/lustre/lustre/ptlrpc/pack_generic.c         |  6 +++---
>  drivers/staging/rtl8188eu/hal/usb_halinit.c                 |  1 +
>  drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c            |  1 +
>  drivers/staging/rtl8192e/rtllib_wx.c                        |  3 +--
>  drivers/staging/rtl8723bs/core/rtw_mlme_ext.c               |  2 +-
>  .../staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c    |  2 ++
>  drivers/staging/rtlwifi/halmac/rtl_halmac.c                 |  2 +-
>  .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c  |  3 +--
>  drivers/staging/vt6656/card.c                               |  2 ++
>  20 files changed, 50 insertions(+), 19 deletions(-)
>
> --
> 2.7.4

Andreas, Stefan:
Thank you for your reviews and ACKs

Greg:
Thank you for applying the patches.

--
Gustavo A. R. Silva

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 00/20] mark expected switch fall-throughs
@ 2017-10-12 16:15 Gustavo A. R. Silva
  2017-10-23 19:33 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-12 16:15 UTC (permalink / raw)
  To: linux-rpi-kernel, linux-arm-kernel, lustre-devel, devel, linux-kernel
  Cc: Oleg Drokin, Andreas Dilger, James Simmons, Greg Kroah-Hartman,
	Ian Abbott, H Hartley Sweeten, Eric Anholt, Stefan Wahren,
	Forest Bond, Gustavo A. R. Silva

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

In Kees Cook words:
"This is an unfortunate omission in the C language, and thankfully both
gcc and clang have stepped up to solve this the same way static
analyzers have solved it. It does both document the intention for
humans and provide a way for analyzers to report issues.

Having the compiler help us not make mistakes is quite handy."

In some cases there were "no break" or "fall thru" comments already
in place. So I replaced them with proper "fall through" comments, which
is what GCC is expecting to find.

For the rest of the cases, please double check if the actual intention
of the code is to fall through.

Thanks!

Gustavo A. R. Silva (20):
  staging: ks7010: ks_wlan_net: mark expected switch fall-throughs
  staging: lustre: lnet: socklnd: mark expected switch fall-through
  staging: rtl8192e: mark expected switch fall-through
  staging: rtl8723bs: rtw_mlme_ext: mark expected switch fall-through
  staging: lustre: lnet: net_fault: mark expected switch fall-through
  staging: comedi: s526: mark expected switch fall-through
  staging: rtl8188eu: usb_halinit: mark expected switch fall-through
  staging: vc04_services: vchiq_core: mark expected switch fall-through
  staging: vt6656: card: mark expected switch fall-throughs
  staging: rtl8188eu: usb_ops_linux: mark expected switch fall-through
  staging: r8822be: mark expected switch fall-throughs
  staging: lustre: lnet: selftest: mark expected switch fall-through
  staging: rtlwifi: halmac: mark expected switch fall-through
  staging: lustre: lnet: selftest: mark expected switch fall-throughs
  staging: lustre: llite: mark expected switch fall-through
  staging: lustre: lprocfs: mark expected switch fall-throughs
  staging: lustre: ldlm: mark expected switch fall-through
  staging: lustre: osc: mark expected switch fall-through
  staging: lustre: ptlrpc: mark expected switch fall-throughs
  staging: lustre: rpc: mark expected switch fall-throughs

 drivers/staging/comedi/drivers/s526.c                       |  5 ++---
 drivers/staging/ks7010/ks_wlan_net.c                        | 10 ++++++++++
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c         |  2 +-
 drivers/staging/lustre/lnet/lnet/net_fault.c                |  1 +
 drivers/staging/lustre/lnet/selftest/conctl.c               |  1 +
 drivers/staging/lustre/lnet/selftest/module.c               |  5 ++++-
 drivers/staging/lustre/lnet/selftest/rpc.c                  | 13 +++++++++----
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c           |  1 +
 drivers/staging/lustre/lustre/llite/namei.c                 |  4 +++-
 drivers/staging/lustre/lustre/obdclass/lprocfs_status.c     |  4 ++++
 drivers/staging/lustre/lustre/osc/osc_cache.c               |  1 +
 drivers/staging/lustre/lustre/ptlrpc/pack_generic.c         |  6 +++---
 drivers/staging/rtl8188eu/hal/usb_halinit.c                 |  1 +
 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c            |  1 +
 drivers/staging/rtl8192e/rtllib_wx.c                        |  3 +--
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c               |  2 +-
 .../staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c    |  2 ++
 drivers/staging/rtlwifi/halmac/rtl_halmac.c                 |  2 +-
 .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c  |  3 +--
 drivers/staging/vt6656/card.c                               |  2 ++
 20 files changed, 50 insertions(+), 19 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2018-11-06 17:00 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:37 ` [PATCH 01/20] ath6kl: Mark expected switch fall-through Gustavo A. R. Silva
2018-10-22 21:11   ` Steve deRosier
2018-11-05 11:23   ` Kalle Valo
2018-10-22 20:37 ` [PATCH 02/20] ath9k: ar5008_phy: mark " Gustavo A. R. Silva
2018-11-05 11:16   ` Kalle Valo
2018-10-22 20:38 ` [PATCH 03/20] ath9k: ar9002_phy: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:39 ` [PATCH 04/20] ath9k: hw: mark expected switch fall-through Gustavo A. R. Silva
2018-10-22 20:39 ` [PATCH 05/20] carl9170: rx: " Gustavo A. R. Silva
2018-10-22 20:40 ` [PATCH 06/20] carl9170: tx: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:40 ` [PATCH 07/20] iwlegacy: 4965-mac: mark expected switch fall-through Gustavo A. R. Silva
2018-11-06 17:00   ` Kalle Valo
2018-10-22 20:41 ` [PATCH 08/20] iwlegacy: common: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:42 ` [PATCH 09/20] orinoco_usb: mark expected switch fall-through Gustavo A. R. Silva
2018-10-22 20:42 ` [PATCH 10/20] prism54: isl_38xx: Mark " Gustavo A. R. Silva
2018-10-22 20:42 ` [PATCH 11/20] prism54: isl_ioctl: mark " Gustavo A. R. Silva
2018-10-22 20:43 ` [PATCH 12/20] prism54: islpci_dev: " Gustavo A. R. Silva
2018-10-22 20:43 ` [PATCH 13/20] mwifiex: Mark " Gustavo A. R. Silva
2018-10-22 20:44 ` [PATCH 14/20] rt2x00: rt2400pci: mark " Gustavo A. R. Silva
2018-10-22 20:45 ` [PATCH 15/20] rt2x00: rt2500pci: " Gustavo A. R. Silva
2018-10-22 20:46 ` [PATCH 16/20] rt2x00: rt2800lib: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:46 ` [PATCH 17/20] rt2x00: rt61pci: mark expected switch fall-through Gustavo A. R. Silva
2018-10-22 20:47 ` [PATCH 18/20] ray_cs: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:47 ` [PATCH 19/20] rtlwifi: rtl8821ae: phy: Mark expected switch fall-through Gustavo A. R. Silva
2018-10-23  1:24   ` Pkshih
2018-10-22 20:48 ` [PATCH 20/20] zd1201: mark " Gustavo A. R. Silva
  -- strict thread matches above, loose matches on Subject: below --
2017-10-12 16:15 [PATCH 00/20] mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-23 19:33 ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).