]> Git Repo - J-linux.git/commitdiff
scsi: lpfc: Correct size for cmdwqe/rspwqe for memset()
authorMuhammad Usama Anjum <[email protected]>
Mon, 4 Mar 2024 09:11:19 +0000 (14:11 +0500)
committerMartin K. Petersen <[email protected]>
Sun, 10 Mar 2024 22:17:32 +0000 (18:17 -0400)
The cmdwqe and rspwqe are of type lpfc_wqe128. They should be memset() with
the same type.

Fixes: 61910d6a5243 ("scsi: lpfc: SLI path split: Refactor CT paths")
Signed-off-by: Muhammad Usama Anjum <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Justin Tee <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/lpfc/lpfc_bsg.c

index d80e6e81053b0a9d61aec5574d2d5d3a2d241e64..7d5275d3a740609f96b9041f95921e95eb611006 100644 (file)
@@ -3169,10 +3169,10 @@ lpfc_bsg_diag_loopback_run(struct bsg_job *job)
        }
 
        cmdwqe = &cmdiocbq->wqe;
-       memset(cmdwqe, 0, sizeof(union lpfc_wqe));
+       memset(cmdwqe, 0, sizeof(*cmdwqe));
        if (phba->sli_rev < LPFC_SLI_REV4) {
                rspwqe = &rspiocbq->wqe;
-               memset(rspwqe, 0, sizeof(union lpfc_wqe));
+               memset(rspwqe, 0, sizeof(*rspwqe));
        }
 
        INIT_LIST_HEAD(&head);
This page took 0.065559 seconds and 4 git commands to generate.