scsi: lpfc: Define lpfc_dmabuf type for ctx_buf ptr
authorJustin Tee <justin.tee@broadcom.com>
Tue, 5 Mar 2024 20:05:00 +0000 (12:05 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 10 Mar 2024 22:56:44 +0000 (18:56 -0400)
commit115d137aa918d879e3cca9605bbf59e0482aa734
treead34bddd57da3c7deee0c030383c8bbfbeefef5c
parent18f7fe44bc79e67eccd4c118f10aa16647d446f8
scsi: lpfc: Define lpfc_dmabuf type for ctx_buf ptr

In LPFC_MBOXQ_t, the ctx_buf ptr shouldn't be defined as a generic void
*ptr.  It is named ctx_buf and it should only be used as an lpfc_dmabuf
*ptr.  Due to the void* declaration, there have been abuses of ctx_buf for
things not related to lpfc_dmabuf.

So, set the ptr type for *ctx_buf as lpfc_dmabuf.  Remove all type casts on
ctx_buf because it is no longer a void *ptr.  Convert the abuse of ctx_buf
for something not related to lpfc_dmabuf to use the void *context3 ptr.

A particular abuse of the ctx_buf warranted a new void *ext_buf ptr.
However, the usage of this new void *ext_buf is not generic.  It is
intended to only hold virtual addresses for extended mailbox commands.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20240305200503.57317-10-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_bsg.c
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_mbox.c
drivers/scsi/lpfc/lpfc_nportdisc.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_sli.h
drivers/scsi/lpfc/lpfc_vport.c