Commit 223b78ea authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Martin K. Petersen

scsi: lpfc: fix building without debugfs support

On a randconfig build without CONFIG_SCSI_LPFC_DEBUG_FS, I ran into
multiple compile failures:

drivers/scsi/lpfc/lpfc_debugfs.h: In function 'lpfc_debug_dump_wq':
drivers/scsi/lpfc/lpfc_debugfs.h:405:15: error: 'DUMP_FCP' undeclared (first use in this function); did you mean 'DUMP_VAR'?
drivers/scsi/lpfc/lpfc_debugfs.h:405:15: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/lpfc/lpfc_debugfs.h:408:22: error: 'DUMP_NVME' undeclared (first use in this function); did you mean 'DUMP_NONE'?
drivers/scsi/lpfc/lpfc_nvmet.c: In function 'lpfc_nvmet_xmt_ls_rsp_cmp':
drivers/scsi/lpfc/lpfc_nvmet.c:109:2: error: implicit declaration of function 'lpfc_nvmeio_data'; did you mean 'lpfc_mem_free'? [-Werror=implicit-function-declaration]
drivers/scsi/lpfc/lpfc_nvmet.c: In function 'lpfc_nvmet_xmt_fcp_op':
drivers/scsi/lpfc/lpfc_nvmet.c:523:10: error: unused variable 'id' [-Werror=unused-variable]

They are all trivial to fix, so I'm doing it in a combined patch here.

Fixes: 1d9d5a98 ("scsi: lpfc: refactor debugfs queue dump routines")
Fixes: bd2cdd5e ("scsi: lpfc: NVME Initiator: Add debugfs support")
Fixes: 2b65e182 ("scsi: lpfc: NVME Target: Add debugfs support")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a71e3cdc
...@@ -44,14 +44,6 @@ ...@@ -44,14 +44,6 @@
/* hbqinfo output buffer size */ /* hbqinfo output buffer size */
#define LPFC_HBQINFO_SIZE 8192 #define LPFC_HBQINFO_SIZE 8192
enum {
DUMP_FCP,
DUMP_NVME,
DUMP_MBX,
DUMP_ELS,
DUMP_NVMELS,
};
/* nvmestat output buffer size */ /* nvmestat output buffer size */
#define LPFC_NVMESTAT_SIZE 8192 #define LPFC_NVMESTAT_SIZE 8192
#define LPFC_NVMEKTIME_SIZE 8192 #define LPFC_NVMEKTIME_SIZE 8192
...@@ -283,8 +275,22 @@ struct lpfc_idiag { ...@@ -283,8 +275,22 @@ struct lpfc_idiag {
struct lpfc_idiag_offset offset; struct lpfc_idiag_offset offset;
void *ptr_private; void *ptr_private;
}; };
#else
#define lpfc_nvmeio_data(phba, fmt, arg...) \
no_printk(fmt, ##arg)
#endif #endif
enum {
DUMP_FCP,
DUMP_NVME,
DUMP_MBX,
DUMP_ELS,
DUMP_NVMELS,
};
/* Mask for discovery_trace */ /* Mask for discovery_trace */
#define LPFC_DISC_TRC_ELS_CMD 0x1 /* Trace ELS commands */ #define LPFC_DISC_TRC_ELS_CMD 0x1 /* Trace ELS commands */
#define LPFC_DISC_TRC_ELS_RSP 0x2 /* Trace ELS response */ #define LPFC_DISC_TRC_ELS_RSP 0x2 /* Trace ELS response */
......
...@@ -520,7 +520,7 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport, ...@@ -520,7 +520,7 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport,
struct lpfc_hba *phba = ctxp->phba; struct lpfc_hba *phba = ctxp->phba;
struct lpfc_iocbq *nvmewqeq; struct lpfc_iocbq *nvmewqeq;
unsigned long iflags; unsigned long iflags;
int rc, id; int rc;
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
if (phba->ktime_on) { if (phba->ktime_on) {
...@@ -530,7 +530,7 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport, ...@@ -530,7 +530,7 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport,
ctxp->ts_nvme_data = ktime_get_ns(); ctxp->ts_nvme_data = ktime_get_ns();
} }
if (phba->cpucheck_on & LPFC_CHECK_NVMET_IO) { if (phba->cpucheck_on & LPFC_CHECK_NVMET_IO) {
id = smp_processor_id(); int id = smp_processor_id();
ctxp->cpu = id; ctxp->cpu = id;
if (id < LPFC_CHECK_CPU_CNT) if (id < LPFC_CHECK_CPU_CNT)
phba->cpucheck_xmt_io[id]++; phba->cpucheck_xmt_io[id]++;
......
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