Skip to contentSkip to conversation

carl9170: Use fallthrough pseudo-keyword

PATCH In review Gustavo A. R. Silva 3 participants 3 messages Aug 21, 2020 – Aug 27, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 carl9170: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

---
 drivers/net/wireless/ath/carl9170/rx.c | 2 +-
 drivers/net/wireless/ath/carl9170/tx.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/carl9170/rx.c +1 -1
index 23ab8a80c18c..908c4c8b7f82 100644
@@ -766,7 +766,7 @@ static void carl9170_rx_untie_data(struct ar9170 *ar, u8 *buf, int len)
 
 			goto drop;
 		}
-		/* fall through */
+		fallthrough;
 
 	case AR9170_RX_STATUS_MPDU_MIDDLE:
 		/*  These are just data + mac status */
drivers/net/wireless/ath/carl9170/tx.c +3 -3
index 2407931440ed..8f896e1a6ad6 100644
@@ -830,12 +830,12 @@ static bool carl9170_tx_rts_check(struct ar9170 *ar,
 	case CARL9170_ERP_AUTO:
 		if (ampdu)
 			break;
-		/* fall through */
+		fallthrough;
 
 	case CARL9170_ERP_MAC80211:
 		if (!(rate->flags & IEEE80211_TX_RC_USE_RTS_CTS))
 			break;
-		/* fall through */
+		fallthrough;
 
 	case CARL9170_ERP_RTS:
 		if (likely(!multi))
@@ -856,7 +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 */
+		fallthrough;
 
 	case CARL9170_ERP_CTS:
 		return true;
Signature · 1 line
2.27.0
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 8 lines · Gustavo A. R. Silva

Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Patch applied to ath-next branch of ath.git, thanks.

6df74f61e9a2 carl9170: Use fallthrough pseudo-keyword

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

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