Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Arnd Bergmann and committed by
Martin K. Petersen
73626173 07a191f7

+3 -2
+3 -2
drivers/scsi/lpfc/lpfc_nvmet.c
··· 1508 1508 struct rqb_dmabuf *nvmebuf, 1509 1509 uint64_t isr_timestamp) 1510 1510 { 1511 - #if (IS_ENABLED(CONFIG_NVME_TARGET_FC)) 1512 1511 struct lpfc_nvmet_rcv_ctx *ctxp; 1513 1512 struct lpfc_nvmet_tgtport *tgtp; 1514 1513 struct fc_frame_header *fc_hdr; ··· 1520 1521 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS 1521 1522 uint32_t id; 1522 1523 #endif 1524 + 1525 + if (!IS_ENABLED(CONFIG_NVME_TARGET_FC)) 1526 + return; 1523 1527 1524 1528 ctx_buf = NULL; 1525 1529 if (!nvmebuf || !phba->targetport) { ··· 1667 1665 1668 1666 if (nvmebuf) 1669 1667 lpfc_rq_buf_free(phba, &nvmebuf->hbuf); /* repost */ 1670 - #endif 1671 1668 } 1672 1669 1673 1670 /**