forked from Minki/linux
scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, I replaced "Drop thru" and "Fall Thru" with "fall through" annotations, which is what GCC is expecting to find. Also, in some cases a dash is added as a token in order to separate the "fall through" annotation from the rest of the comment on the same line, which is what GCC is expecting to find. Addresses-Coverity-ID: 114979 ("Missing break in switch") Addresses-Coverity-ID: 114980 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
12de280b36
commit
5bd5f66cf1
@ -9408,6 +9408,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
|
||||
cmnd = CMD_XMIT_SEQUENCE64_CR;
|
||||
if (phba->link_flag & LS_LOOPBACK_MODE)
|
||||
bf_set(wqe_xo, &wqe->xmit_sequence.wge_ctl, 1);
|
||||
/* fall through */
|
||||
case CMD_XMIT_SEQUENCE64_CR:
|
||||
/* word3 iocb=io_tag32 wqe=reserved */
|
||||
wqe->xmit_sequence.rsvd3 = 0;
|
||||
@ -13529,6 +13530,7 @@ lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe)
|
||||
case FC_STATUS_RQ_BUF_LEN_EXCEEDED:
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
|
||||
"2537 Receive Frame Truncated!!\n");
|
||||
/* fall through */
|
||||
case FC_STATUS_RQ_SUCCESS:
|
||||
spin_lock_irqsave(&phba->hbalock, iflags);
|
||||
lpfc_sli4_rq_release(hrq, drq);
|
||||
@ -13938,7 +13940,7 @@ lpfc_sli4_nvmet_handle_rcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
|
||||
case FC_STATUS_RQ_BUF_LEN_EXCEEDED:
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
|
||||
"6126 Receive Frame Truncated!!\n");
|
||||
/* Drop thru */
|
||||
/* fall through */
|
||||
case FC_STATUS_RQ_SUCCESS:
|
||||
spin_lock_irqsave(&phba->hbalock, iflags);
|
||||
lpfc_sli4_rq_release(hrq, drq);
|
||||
@ -14850,7 +14852,7 @@ lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint32_t imax)
|
||||
eq->entry_count);
|
||||
if (eq->entry_count < 256)
|
||||
return -EINVAL;
|
||||
/* otherwise default to smallest count (drop through) */
|
||||
/* fall through - otherwise default to smallest count */
|
||||
case 256:
|
||||
bf_set(lpfc_eq_context_count, &eq_create->u.request.context,
|
||||
LPFC_EQ_CNT_256);
|
||||
@ -14981,7 +14983,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq,
|
||||
LPFC_CQ_CNT_WORD7);
|
||||
break;
|
||||
}
|
||||
/* Fall Thru */
|
||||
/* fall through */
|
||||
default:
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
|
||||
"0361 Unsupported CQ count: "
|
||||
@ -14992,7 +14994,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq,
|
||||
status = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
/* otherwise default to smallest count (drop through) */
|
||||
/* fall through - otherwise default to smallest count */
|
||||
case 256:
|
||||
bf_set(lpfc_cq_context_count, &cq_create->u.request.context,
|
||||
LPFC_CQ_CNT_256);
|
||||
@ -15152,7 +15154,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
|
||||
LPFC_CQ_CNT_WORD7);
|
||||
break;
|
||||
}
|
||||
/* Fall Thru */
|
||||
/* fall through */
|
||||
default:
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
|
||||
"3118 Bad CQ count. (%d)\n",
|
||||
@ -15161,7 +15163,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
|
||||
status = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
/* otherwise default to smallest (drop thru) */
|
||||
/* fall through - otherwise default to smallest */
|
||||
case 256:
|
||||
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
|
||||
&cq_set->u.request, LPFC_CQ_CNT_256);
|
||||
@ -15433,7 +15435,7 @@ lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq,
|
||||
status = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
/* otherwise default to smallest count (drop through) */
|
||||
/* fall through - otherwise default to smallest count */
|
||||
case 16:
|
||||
bf_set(lpfc_mq_context_ring_size,
|
||||
&mq_create_ext->u.request.context,
|
||||
@ -15852,7 +15854,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
|
||||
status = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
/* otherwise default to smallest count (drop through) */
|
||||
/* fall through - otherwise default to smallest count */
|
||||
case 512:
|
||||
bf_set(lpfc_rq_context_rqe_count,
|
||||
&rq_create->u.request.context,
|
||||
@ -15989,7 +15991,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
|
||||
status = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
/* otherwise default to smallest count (drop through) */
|
||||
/* fall through - otherwise default to smallest count */
|
||||
case 512:
|
||||
bf_set(lpfc_rq_context_rqe_count,
|
||||
&rq_create->u.request.context,
|
||||
|
Loading…
Reference in New Issue
Block a user