scsi: lpfc: correct size for wqe for memset
Subsystems (3)
PATCH v2 1/1 scsi: lpfc: correct size for wqe for memset
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]>
---
Changes since v1:
- Use *wqe instead of type to find sizeof
--- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_nvmet.c +1 -1
@@ -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);
Signature · 1 line
2.39.2
Il 04/03/24 10:06, Muhammad Usama Anjum ha scritto:
Quoted 4 lines
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]>
Reviewed-by AngeloGioacchino Del Regno <[email protected]>
Quoted 25 lines
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]>---
Changes since v1:
- Use *wqe instead of type to find sizeof--- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/lpfc/lpfc_nvmet.c +1
-2@@ -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); --
Quoted 1 line
2.39.2
Reviewed-by Justin Tee <[email protected]>
Martin K. Petersen
AppliedMuhammad,
Quoted 2 lines
The wqe is of type
lpfc_wqe128. It should be memset with the same type.
Applied to 6.9/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering