netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] net: bna: Use fallthrough pseudo-keyword
@ 2020-10-02 23:00 Gustavo A. R. Silva
  2020-10-04  0:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2020-10-02 23:00 UTC (permalink / raw)
  To: Rasesh Mody, Sudarsana Kalluru, David S. Miller, Jakub Kicinski
  Cc: GR-Linux-NIC-Dev, netdev, linux-kernel, Gustavo A. R. Silva,
	linux-hardening

Replace /* !!! fall through !!! */ comments 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

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/net/ethernet/brocade/bna/bfa_ioc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
index fd805c685d92..cd933817a0b8 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
@@ -269,7 +269,7 @@ bfa_ioc_sm_enabling(struct bfa_ioc *ioc, enum ioc_event event)
 		break;
 
 	case IOC_E_PFFAILED:
-		/* !!! fall through !!! */
+		fallthrough;
 	case IOC_E_HWERROR:
 		ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE);
 		bfa_fsm_set_state(ioc, bfa_ioc_sm_fail);
@@ -365,7 +365,8 @@ bfa_ioc_sm_op(struct bfa_ioc *ioc, enum ioc_event event)
 	case IOC_E_PFFAILED:
 	case IOC_E_HWERROR:
 		bfa_ioc_hb_stop(ioc);
-		/* !!! fall through !!! */
+		fallthrough;
+
 	case IOC_E_HBFAIL:
 		if (ioc->iocpf.auto_recover)
 			bfa_fsm_set_state(ioc, bfa_ioc_sm_fail_retry);
-- 
2.27.0


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

* Re: [PATCH][next] net: bna: Use fallthrough pseudo-keyword
  2020-10-02 23:00 [PATCH][next] net: bna: Use fallthrough pseudo-keyword Gustavo A. R. Silva
@ 2020-10-04  0:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-10-04  0:33 UTC (permalink / raw)
  To: gustavoars
  Cc: rmody, skalluru, kuba, GR-Linux-NIC-Dev, netdev, linux-kernel,
	linux-hardening

From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Date: Fri, 2 Oct 2020 18:00:01 -0500

> Replace /* !!! fall through !!! */ comments 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
> 
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Applied.

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

end of thread, other threads:[~2020-10-04  0:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 23:00 [PATCH][next] net: bna: Use fallthrough pseudo-keyword Gustavo A. R. Silva
2020-10-04  0:33 ` David Miller

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