From a7fc071ab56e59e10a6ca868fad91d9677083dba Mon Sep 17 00:00:00 2001 From: Dick Kennedy Date: Fri, 1 May 2020 14:43:08 -0700 Subject: scsi: lpfc: Fix noderef and address space warnings Running make C=1 M=drivers/scsi/lpfc triggers sparse warnings Correct the code generating the following errors: - Incompatible address space assignment without proper conversion. - Deference of usespace and per-cpu pointers. Link: https://lore.kernel.org/r/20200501214310.91713-8-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen --- drivers/scsi/lpfc/lpfc_mbox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/lpfc/lpfc_mbox.c') diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index e35b52b66d6c..e34e0f11bfdd 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c @@ -1378,7 +1378,8 @@ lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) */ if (phba->cfg_hostmem_hgp && phba->sli_rev != 3) { - phba->host_gp = &phba->mbox->us.s2.host[0]; + phba->host_gp = (struct lpfc_hgp __iomem *) + &phba->mbox->us.s2.host[0]; phba->hbq_put = NULL; offset = (uint8_t *)&phba->mbox->us.s2.host - (uint8_t *)phba->slim2p.virt; -- cgit v1.2.3