Commit e733f8a8 authored by Xiu Jianfeng's avatar Xiu Jianfeng Committed by Martin K. Petersen

scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp()

Use memset_startat() helper to simplify the code, no functional changes.

Link: https://lore.kernel.org/r/20220613021851.59699-1-xiujianfeng@huawei.comReviewed-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 35bf020b
...@@ -722,7 +722,7 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe, ...@@ -722,7 +722,7 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe,
struct lpfc_nvmet_tgtport *tgtp; struct lpfc_nvmet_tgtport *tgtp;
struct nvmefc_tgt_fcp_req *rsp; struct nvmefc_tgt_fcp_req *rsp;
struct lpfc_async_xchg_ctx *ctxp; struct lpfc_async_xchg_ctx *ctxp;
uint32_t status, result, op, start_clean, logerr; uint32_t status, result, op, logerr;
struct lpfc_wcqe_complete *wcqe = &rspwqe->wcqe_cmpl; struct lpfc_wcqe_complete *wcqe = &rspwqe->wcqe_cmpl;
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
int id; int id;
...@@ -820,9 +820,7 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe, ...@@ -820,9 +820,7 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe,
/* lpfc_nvmet_xmt_fcp_release() will recycle the context */ /* lpfc_nvmet_xmt_fcp_release() will recycle the context */
} else { } else {
ctxp->entry_cnt++; ctxp->entry_cnt++;
start_clean = offsetof(struct lpfc_iocbq, cmd_flag); memset_startat(cmdwqe, 0, cmd_flag);
memset(((char *)cmdwqe) + start_clean, 0,
(sizeof(struct lpfc_iocbq) - start_clean));
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
if (ctxp->ts_cmd_nvme) { if (ctxp->ts_cmd_nvme) {
ctxp->ts_isr_data = cmdwqe->isr_timestamp; ctxp->ts_isr_data = cmdwqe->isr_timestamp;
......
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