Skip to content

Commit

Permalink
scsi: lpfc: Correct size for cmdwqe/rspwqe for memset()
Browse files Browse the repository at this point in the history
commit 16cc2ba upstream.

The cmdwqe and rspwqe are of type lpfc_wqe128. They should be memset() with
the same type.

Fixes: 61910d6 ("scsi: lpfc: SLI path split: Refactor CT paths")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/r/20240304091119.847060-1-usama.anjum@collabora.com
Reviewed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
musamaanjum authored and gregkh committed Apr 3, 2024
1 parent 27c6886 commit 8b9da16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/lpfc/lpfc_bsg.c
Expand Up @@ -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);
Expand Down

0 comments on commit 8b9da16

Please sign in to comment.