All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND --next] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp
@ 2022-06-13  2:18 Xiu Jianfeng
  2022-06-13 20:42 ` James Smart
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xiu Jianfeng @ 2022-06-13  2:18 UTC (permalink / raw)
  To: james.smart, dick.kennedy, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

Use memset_startat() helper to simplify the code, no functional change
in this patch.

Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
---
 drivers/scsi/lpfc/lpfc_nvmet.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index c0ee0b39075d..c3cb7e8a2a7c 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -722,7 +722,7 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe,
 	struct lpfc_nvmet_tgtport *tgtp;
 	struct nvmefc_tgt_fcp_req *rsp;
 	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;
 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
 	int id;
@@ -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 */
 	} else {
 		ctxp->entry_cnt++;
-		start_clean = offsetof(struct lpfc_iocbq, cmd_flag);
-		memset(((char *)cmdwqe) + start_clean, 0,
-		       (sizeof(struct lpfc_iocbq) - start_clean));
+		memset_startat(cmdwqe, 0, cmd_flag);
 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
 		if (ctxp->ts_cmd_nvme) {
 			ctxp->ts_isr_data = cmdwqe->isr_timestamp;
-- 
2.17.1


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

* Re: [PATCH RESEND --next] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp
  2022-06-13  2:18 [PATCH RESEND --next] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp Xiu Jianfeng
@ 2022-06-13 20:42 ` James Smart
  2022-06-14  2:08 ` Martin K. Petersen
  2022-06-17  2:21 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: James Smart @ 2022-06-13 20:42 UTC (permalink / raw)
  To: Xiu Jianfeng, james.smart, dick.kennedy, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel

On 6/12/2022 7:18 PM, Xiu Jianfeng wrote:
> Use memset_startat() helper to simplify the code, no functional change
> in this patch.
> 
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
> ---

Reviewed-by: James Smart <jsmart2021@gmail.com>

-- james

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

* Re: [PATCH RESEND --next] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp
  2022-06-13  2:18 [PATCH RESEND --next] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp Xiu Jianfeng
  2022-06-13 20:42 ` James Smart
@ 2022-06-14  2:08 ` Martin K. Petersen
  2022-06-17  2:21 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-06-14  2:08 UTC (permalink / raw)
  To: Xiu Jianfeng
  Cc: james.smart, dick.kennedy, jejb, martin.petersen, linux-scsi,
	linux-kernel


Xiu,

> Use memset_startat() helper to simplify the code, no functional change
> in this patch.

Applied to 5.20/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH RESEND --next] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp
  2022-06-13  2:18 [PATCH RESEND --next] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp Xiu Jianfeng
  2022-06-13 20:42 ` James Smart
  2022-06-14  2:08 ` Martin K. Petersen
@ 2022-06-17  2:21 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-06-17  2:21 UTC (permalink / raw)
  To: james.smart, dick.kennedy, Xiu Jianfeng, jejb
  Cc: Martin K . Petersen, linux-scsi, linux-kernel

On Mon, 13 Jun 2022 10:18:51 +0800, Xiu Jianfeng wrote:

> Use memset_startat() helper to simplify the code, no functional change
> in this patch.
> 
> 

Applied to 5.20/scsi-queue, thanks!

[1/1] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp
      https://git.kernel.org/mkp/scsi/c/e733f8a894e6

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2022-06-17  2:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13  2:18 [PATCH RESEND --next] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp Xiu Jianfeng
2022-06-13 20:42 ` James Smart
2022-06-14  2:08 ` Martin K. Petersen
2022-06-17  2:21 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.