]> Git Repo - J-linux.git/commitdiff
scsi: lpfc: Correct size for wqe for memset()
authorMuhammad Usama Anjum <[email protected]>
Mon, 4 Mar 2024 09:06:48 +0000 (14:06 +0500)
committerMartin K. Petersen <[email protected]>
Sun, 10 Mar 2024 22:16:58 +0000 (18:16 -0400)
The wqe is of type lpfc_wqe128. It should be memset with the same type.

Fixes: 6c621a2229b0 ("scsi: lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context")
Signed-off-by: Muhammad Usama Anjum <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Justin Tee <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/lpfc/lpfc_nvmet.c

index 8258b771bd009e2fe4dbc610db2b56971e3a6f4e..561ced5503c6341e35ca696628f033c419f768f4 100644 (file)
@@ -1586,7 +1586,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba)
                wqe = &nvmewqe->wqe;
 
                /* Initialize WQE */
-               memset(wqe, 0, sizeof(union lpfc_wqe));
+               memset(wqe, 0, sizeof(*wqe));
 
                ctx_buf->iocbq->cmd_dmabuf = NULL;
                spin_lock(&phba->sli4_hba.sgl_list_lock);
This page took 0.057646 seconds and 4 git commands to generate.