linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] ray_cs: Use fallthrough pseudo-keyword
@ 2020-10-08 22:04 Gustavo A. R. Silva
  2020-11-07 11:30 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2020-10-08 22:04 UTC (permalink / raw)
  To: Kalle Valo, David S. Miller, Jakub Kicinski
  Cc: linux-wireless, netdev, linux-kernel, Gustavo A. R. Silva,
	linux-hardening

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

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/net/wireless/ray_cs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index bf3fbd14eda3..590bd974d94f 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -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;
-- 
2.27.0


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

* Re: [PATCH][next] ray_cs: Use fallthrough pseudo-keyword
  2020-10-08 22:04 [PATCH][next] ray_cs: Use fallthrough pseudo-keyword Gustavo A. R. Silva
@ 2020-11-07 11:30 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-11-07 11:30 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: David S. Miller, Jakub Kicinski, linux-wireless, netdev,
	linux-kernel, Gustavo A. R. Silva, linux-hardening

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

> 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
> 
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

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

256ff2ef6c14 ray_cs: Use fallthrough pseudo-keyword

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

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


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-08 22:04 [PATCH][next] ray_cs: Use fallthrough pseudo-keyword Gustavo A. R. Silva
2020-11-07 11:30 ` Kalle Valo

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