Commit 4c7bd259 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Martin K. Petersen

scsi: bfa: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding a couple break statements and replacing /*
fall through */ comments with the new pseudo-keyword macro fallthrough;
instead of just letting the code fall through to the next case.

Notice that Clang doesn't recognize /* fall through */ comments as implicit
fall-through markings.

Link: https://github.com/KSPP/linux/issues/115
Link: https://lore.kernel.org/r/2ae1cafd858238b85fc5e7fe5cc183843e21ec9f.1605896059.git.gustavoars@kernel.orgSigned-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4886dd0a
...@@ -5671,7 +5671,7 @@ bfa_fcs_lport_scn_process_rscn(struct bfa_fcs_lport_s *port, ...@@ -5671,7 +5671,7 @@ bfa_fcs_lport_scn_process_rscn(struct bfa_fcs_lport_s *port,
bfa_fcs_lport_ms_fabric_rscn(port); bfa_fcs_lport_ms_fabric_rscn(port);
break; break;
} }
/* !!!!!!!!! Fall Through !!!!!!!!!!!!! */ fallthrough;
case FC_RSCN_FORMAT_AREA: case FC_RSCN_FORMAT_AREA:
case FC_RSCN_FORMAT_DOMAIN: case FC_RSCN_FORMAT_DOMAIN:
......
...@@ -387,7 +387,7 @@ bfa_ioc_sm_getattr(struct bfa_ioc_s *ioc, enum ioc_event event) ...@@ -387,7 +387,7 @@ bfa_ioc_sm_getattr(struct bfa_ioc_s *ioc, enum ioc_event event)
case IOC_E_PFFAILED: case IOC_E_PFFAILED:
case IOC_E_HWERROR: case IOC_E_HWERROR:
bfa_ioc_timer_stop(ioc); bfa_ioc_timer_stop(ioc);
/* !!! fall through !!! */ fallthrough;
case IOC_E_TIMEOUT: case IOC_E_TIMEOUT:
ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE);
bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); bfa_fsm_set_state(ioc, bfa_ioc_sm_fail);
...@@ -437,7 +437,7 @@ bfa_ioc_sm_op(struct bfa_ioc_s *ioc, enum ioc_event event) ...@@ -437,7 +437,7 @@ bfa_ioc_sm_op(struct bfa_ioc_s *ioc, enum ioc_event event)
case IOC_E_PFFAILED: case IOC_E_PFFAILED:
case IOC_E_HWERROR: case IOC_E_HWERROR:
bfa_hb_timer_stop(ioc); bfa_hb_timer_stop(ioc);
/* !!! fall through !!! */ fallthrough;
case IOC_E_HBFAIL: case IOC_E_HBFAIL:
if (ioc->iocpf.auto_recover) if (ioc->iocpf.auto_recover)
bfa_fsm_set_state(ioc, bfa_ioc_sm_fail_retry); bfa_fsm_set_state(ioc, bfa_ioc_sm_fail_retry);
...@@ -3299,6 +3299,7 @@ bfa_ablk_isr(void *cbarg, struct bfi_mbmsg_s *msg) ...@@ -3299,6 +3299,7 @@ bfa_ablk_isr(void *cbarg, struct bfi_mbmsg_s *msg)
case BFI_ABLK_I2H_PORT_CONFIG: case BFI_ABLK_I2H_PORT_CONFIG:
/* update config port mode */ /* update config port mode */
ablk->ioc->port_mode_cfg = rsp->port_mode; ablk->ioc->port_mode_cfg = rsp->port_mode;
break;
case BFI_ABLK_I2H_PF_DELETE: case BFI_ABLK_I2H_PF_DELETE:
case BFI_ABLK_I2H_PF_UPDATE: case BFI_ABLK_I2H_PF_UPDATE:
...@@ -5871,6 +5872,7 @@ bfa_dconf_sm_uninit(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event) ...@@ -5871,6 +5872,7 @@ bfa_dconf_sm_uninit(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event)
break; break;
case BFA_DCONF_SM_EXIT: case BFA_DCONF_SM_EXIT:
bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE);
break;
case BFA_DCONF_SM_IOCDISABLE: case BFA_DCONF_SM_IOCDISABLE:
case BFA_DCONF_SM_WR: case BFA_DCONF_SM_WR:
case BFA_DCONF_SM_FLASH_COMP: case BFA_DCONF_SM_FLASH_COMP:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment