scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 26 Nov 2018 17:52:21 +0000 (11:52 -0600)
committerGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 8 Apr 2019 23:37:24 +0000 (18:37 -0500)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that I replaced "Fall through !!!" with a "fall through"
annotation, which is what GCC is expecting to find.

Addresses-Coverity-ID: 114971 ("Missing break in switch")
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
drivers/scsi/bfa/bfa_fcpim.c

index 2c85f5b1f9c1c0f082764bee358aaa302887d4fa..7e996bcf026c4eba437aa95bd78d5252b51c7a4b 100644 (file)
@@ -2586,6 +2586,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
        case FCP_IODIR_RW:
                bfa_stats(itnim, input_reqs);
                bfa_stats(itnim, output_reqs);
+               /* fall through */
        default:
                bfi_h2i_set(m->mh, BFI_MC_IOIM_IO, 0, bfa_fn_lpu(ioim->bfa));
        }
@@ -2820,6 +2821,7 @@ bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
 
        case BFI_IOIM_STS_TIMEDOUT:
                bfa_stats(ioim->itnim, iocomp_timedout);
+               /* fall through */
        case BFI_IOIM_STS_ABORTED:
                rsp->io_status = BFI_IOIM_STS_ABORTED;
                bfa_stats(ioim->itnim, iocomp_aborted);
@@ -3215,9 +3217,7 @@ bfa_tskim_sm_cleanup_qfull(struct bfa_tskim_s *tskim,
        switch (event) {
        case BFA_TSKIM_SM_DONE:
                bfa_reqq_wcancel(&tskim->reqq_wait);
-               /*
-                * Fall through !!!
-                */
+               /* fall through */
        case BFA_TSKIM_SM_QRESUME:
                bfa_sm_set_state(tskim, bfa_tskim_sm_cleanup);
                bfa_tskim_send_abort(tskim);