Skip to contentSkip to conversation

ray_cs: Use fallthrough pseudo-keyword

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Oct 8, 2020 – Nov 7, 2020

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

PATCH 1/1 ray_cs: Use fallthrough pseudo-keyword

In order to enable -Wimplicit-fallthrough for Clang[1], replace the existing /* fall through */ comments with the new pseudo-keyword macro fallthrough[2].

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

---
 drivers/net/wireless/ray_cs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ray_cs.c +3 -3
index bf3fbd14eda3..590bd974d94f 100644
@@ -877,10 +877,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 */
+		fallthrough;
 	case ECCSFULL:
 		pr_debug("ray_hw_xmit No free tx ccs\n");
-		/* fall through */
+		fallthrough;
 	case ECARDGONE:
 		netif_stop_queue(dev);
 		return XMIT_NO_CCS;
@@ -1272,7 +1272,7 @@ static int ray_set_mode(struct net_device *dev, struct iw_request_info *info,
 	switch (wrqu->mode) {
 	case IW_MODE_ADHOC:
 		card_mode = 0;
-		/* Fall through */
+		fallthrough;
 	case IW_MODE_INFRA:
 		local->sparm.b5.a_network_type = card_mode;
 		break;
Signature · 1 line
2.27.0
#1 lore raw
Quoted 8 lines · Gustavo A. R. Silva

In order to enable -Wimplicit-fallthrough for Clang[1], replace the existing /* fall through */ comments with the new pseudo-keyword macro fallthrough[2].

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

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

256ff2ef6c14 ray_cs: Use fallthrough pseudo-keyword

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/20201008220422.GA6926@embeddedor/

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