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

scsi: lpfc: avoid an unused function warning

The only reference to lpfc_nvmet_replenish_context() is inside of an
disabled:

drivers/scsi/lpfc/lpfc_nvmet.c:1457:1: error: 'lpfc_nvmet_replenish_context' defined but not used [-Werror=unused-function]

This replaces the preprocessor conditional with a C condition, so the
compiler can see that the function is intentionally unused.

Fixes: 9a38e4f1c82f ("scsi: lpfc: Fix MRQ > 1 context list handling")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 07a191f7
...@@ -1508,7 +1508,6 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba, ...@@ -1508,7 +1508,6 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba,
struct rqb_dmabuf *nvmebuf, struct rqb_dmabuf *nvmebuf,
uint64_t isr_timestamp) uint64_t isr_timestamp)
{ {
#if (IS_ENABLED(CONFIG_NVME_TARGET_FC))
struct lpfc_nvmet_rcv_ctx *ctxp; struct lpfc_nvmet_rcv_ctx *ctxp;
struct lpfc_nvmet_tgtport *tgtp; struct lpfc_nvmet_tgtport *tgtp;
struct fc_frame_header *fc_hdr; struct fc_frame_header *fc_hdr;
...@@ -1522,6 +1521,9 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba, ...@@ -1522,6 +1521,9 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba,
uint32_t id; uint32_t id;
#endif #endif
if (!IS_ENABLED(CONFIG_NVME_TARGET_FC))
return;
ctx_buf = NULL; ctx_buf = NULL;
if (!nvmebuf || !phba->targetport) { if (!nvmebuf || !phba->targetport) {
lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR,
...@@ -1665,7 +1667,6 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba, ...@@ -1665,7 +1667,6 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba,
if (nvmebuf) if (nvmebuf)
lpfc_rq_buf_free(phba, &nvmebuf->hbuf); /* repost */ lpfc_rq_buf_free(phba, &nvmebuf->hbuf); /* repost */
#endif
} }
/** /**
......
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