linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] mt7601u: Use fallthrough pseudo-keyword
@ 2020-09-01 17:36 Gustavo A. R. Silva
  2020-09-07  8:30 ` Kalle Valo
  2020-09-09 11:00 ` Joe Perches
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2020-09-01 17:36 UTC (permalink / raw)
  To: Jakub Kicinski, Kalle Valo, David S. Miller, Matthias Brugger
  Cc: netdev, linux-wireless, linux-kernel, Gustavo A. R. Silva,
	linux-mediatek, linux-arm-kernel

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

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

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/net/wireless/mediatek/mt7601u/dma.c | 4 ++--
 drivers/net/wireless/mediatek/mt7601u/mac.c | 4 ++--
 drivers/net/wireless/mediatek/mt7601u/phy.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c
index f6a0454abe04..09f931d4598c 100644
--- a/drivers/net/wireless/mediatek/mt7601u/dma.c
+++ b/drivers/net/wireless/mediatek/mt7601u/dma.c
@@ -196,7 +196,7 @@ static void mt7601u_complete_rx(struct urb *urb)
 	default:
 		dev_err_ratelimited(dev->dev, "rx urb failed: %d\n",
 				    urb->status);
-		/* fall through */
+		fallthrough;
 	case 0:
 		break;
 	}
@@ -241,7 +241,7 @@ static void mt7601u_complete_tx(struct urb *urb)
 	default:
 		dev_err_ratelimited(dev->dev, "tx urb failed: %d\n",
 				    urb->status);
-		/* fall through */
+		fallthrough;
 	case 0:
 		break;
 	}
diff --git a/drivers/net/wireless/mediatek/mt7601u/mac.c b/drivers/net/wireless/mediatek/mt7601u/mac.c
index cad5e81fcf77..d2ee1aaa3c81 100644
--- a/drivers/net/wireless/mediatek/mt7601u/mac.c
+++ b/drivers/net/wireless/mediatek/mt7601u/mac.c
@@ -45,7 +45,7 @@ mt76_mac_process_tx_rate(struct ieee80211_tx_rate *txrate, u16 rate)
 		return;
 	case MT_PHY_TYPE_HT_GF:
 		txrate->flags |= IEEE80211_TX_RC_GREEN_FIELD;
-		/* fall through */
+		fallthrough;
 	case MT_PHY_TYPE_HT:
 		txrate->flags |= IEEE80211_TX_RC_MCS;
 		txrate->idx = idx;
@@ -419,7 +419,7 @@ mt76_mac_process_rate(struct ieee80211_rx_status *status, u16 rate)
 		return;
 	case MT_PHY_TYPE_HT_GF:
 		status->enc_flags |= RX_ENC_FLAG_HT_GF;
-		/* fall through */
+		fallthrough;
 	case MT_PHY_TYPE_HT:
 		status->encoding = RX_ENC_HT;
 		status->rate_idx = idx;
diff --git a/drivers/net/wireless/mediatek/mt7601u/phy.c b/drivers/net/wireless/mediatek/mt7601u/phy.c
index d863ab4a66c9..430ae4c1d7db 100644
--- a/drivers/net/wireless/mediatek/mt7601u/phy.c
+++ b/drivers/net/wireless/mediatek/mt7601u/phy.c
@@ -787,7 +787,7 @@ mt7601u_phy_rf_pa_mode_val(struct mt7601u_dev *dev, int phy_mode, int tx_rate)
 	switch (phy_mode) {
 	case MT_PHY_TYPE_OFDM:
 		tx_rate += 4;
-		/* fall through */
+		fallthrough;
 	case MT_PHY_TYPE_CCK:
 		reg = dev->rf_pa_mode[0];
 		break;
-- 
2.27.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH][next] mt7601u: Use fallthrough pseudo-keyword
  2020-09-01 17:36 [PATCH][next] mt7601u: Use fallthrough pseudo-keyword Gustavo A. R. Silva
@ 2020-09-07  8:30 ` Kalle Valo
  2020-09-09 11:00 ` Joe Perches
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2020-09-07  8:30 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Jakub Kicinski, netdev, linux-wireless, linux-kernel,
	Gustavo A. R. Silva, linux-mediatek, Matthias Brugger,
	David S. Miller, linux-arm-kernel

"Gustavo A. R. Silva" <gustavoars@kernel.org> wrote:

> Replace the existing /* fall through */ comments and its variants with
> the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
> fall-through markings when it is the case.
> 
> [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
> 
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Patch applied to wireless-drivers-next.git, thanks.

1808191dca82 mt7601u: Use fallthrough pseudo-keyword

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

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


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH][next] mt7601u: Use fallthrough pseudo-keyword
  2020-09-01 17:36 [PATCH][next] mt7601u: Use fallthrough pseudo-keyword Gustavo A. R. Silva
  2020-09-07  8:30 ` Kalle Valo
@ 2020-09-09 11:00 ` Joe Perches
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2020-09-09 11:00 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Jakub Kicinski, Kalle Valo, David S. Miller,
	Matthias Brugger
  Cc: netdev, linux-mediatek, linux-wireless, linux-kernel, linux-arm-kernel

On Tue, 2020-09-01 at 12:36 -0500, Gustavo A. R. Silva wrote:
> Replace the existing /* fall through */ comments and its variants with
> the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
> fall-through markings when it is the case.
[]
> diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c
[]
> @@ -196,7 +196,7 @@ static void mt7601u_complete_rx(struct urb *urb)
>  	default:
>  		dev_err_ratelimited(dev->dev, "rx urb failed: %d\n",
>  				    urb->status);
> -		/* fall through */
> +		fallthrough;
		
		fallthrough to break is odd.
		break would probably be better.

>  	case 0:
>  		break;
>  	}
> @@ -241,7 +241,7 @@ static void mt7601u_complete_tx(struct urb *urb)
>  	default:
>  		dev_err_ratelimited(dev->dev, "tx urb failed: %d\n",
>  				    urb->status);
> -		/* fall through */
> +		fallthrough;

here too...

>  	case 0:
>  		break;
>  	}
> 


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

end of thread, other threads:[~2020-09-09 11:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 17:36 [PATCH][next] mt7601u: Use fallthrough pseudo-keyword Gustavo A. R. Silva
2020-09-07  8:30 ` Kalle Valo
2020-09-09 11:00 ` Joe Perches

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