Commit 37e38409 authored by James Smart's avatar James Smart Committed by Martin K. Petersen

scsi: lpfc: Fix compilation errors on kernels with no CONFIG_DEBUG_FS

The Kernel test robot flagged the following warning:

  ".../lpfc_init.c:7788:35: error: 'struct lpfc_sli4_hba' has no member
   named 'c_stat'"

Reviewing this issue highlighted that one of the recent patches caused the
driver to no longer compile cleanly if CONFIG_DEBUG_FS is not set.

Correct the different areas that are failing to compile.

Link: https://lore.kernel.org/r/20210908050927.37275-1-jsmart2021@gmail.com
Fixes: 02243836 ("scsi: lpfc: Add support for the CM framework")
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Build-tested-by: default avatarNathan Chancellor <nathan@kernel.org>
Co-developed-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 59936430
...@@ -8277,11 +8277,11 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) ...@@ -8277,11 +8277,11 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
return 0; return 0;
out_free_hba_hdwq_info: out_free_hba_hdwq_info:
free_percpu(phba->sli4_hba.c_stat);
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
free_percpu(phba->sli4_hba.c_stat);
out_free_hba_idle_stat: out_free_hba_idle_stat:
kfree(phba->sli4_hba.idle_stat);
#endif #endif
kfree(phba->sli4_hba.idle_stat);
out_free_hba_eq_info: out_free_hba_eq_info:
free_percpu(phba->sli4_hba.eq_info); free_percpu(phba->sli4_hba.eq_info);
out_free_hba_cpu_map: out_free_hba_cpu_map:
......
...@@ -1489,9 +1489,7 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport, ...@@ -1489,9 +1489,7 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport,
struct lpfc_nvme_qhandle *lpfc_queue_info; struct lpfc_nvme_qhandle *lpfc_queue_info;
struct lpfc_nvme_fcpreq_priv *freqpriv; struct lpfc_nvme_fcpreq_priv *freqpriv;
struct nvme_common_command *sqe; struct nvme_common_command *sqe;
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
uint64_t start = 0; uint64_t start = 0;
#endif
/* Validate pointers. LLDD fault handling with transport does /* Validate pointers. LLDD fault handling with transport does
* have timing races. * have timing races.
......
...@@ -5578,12 +5578,8 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) ...@@ -5578,12 +5578,8 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
int err, idx; int err, idx;
u8 *uuid = NULL; u8 *uuid = NULL;
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS uint64_t start;
uint64_t start = 0L;
if (phba->ktime_on)
start = ktime_get_ns();
#endif
start = ktime_get_ns(); start = ktime_get_ns();
rdata = lpfc_rport_data_from_scsi_device(cmnd->device); rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment