scsi: lpfc: Fix a recently introduced compiler warning
authorBart Van Assche <bvanassche@acm.org>
Fri, 5 Apr 2019 16:14:10 +0000 (09:14 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 9 Apr 2019 01:26:11 +0000 (21:26 -0400)
This patch avoids that the following compiler warning is reported with
CONFIG_NVME_FC=n:

drivers/scsi/lpfc/lpfc_nvme.c:2140:1: warning: 'lpfc_nvme_lport_unreg_wait' defined but not used [-Wunused-function]
 lpfc_nvme_lport_unreg_wait(struct lpfc_vport *vport,
 ^~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 3999df75bccb ("scsi: lpfc: Declare local functions static")
Cc: James Smart <james.smart@broadcom.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nvme.c

index 8a123ff9825020ebdc8c8f73bc850c02924fa7c4..9d99cb91539078e1cde16351a9543789df1fcd38 100644 (file)
@@ -2126,6 +2126,7 @@ lpfc_nvme_create_localport(struct lpfc_vport *vport)
        return ret;
 }
 
+#if (IS_ENABLED(CONFIG_NVME_FC))
 /* lpfc_nvme_lport_unreg_wait - Wait for the host to complete an lport unreg.
  *
  * The driver has to wait for the host nvme transport to callback
@@ -2141,7 +2142,6 @@ lpfc_nvme_lport_unreg_wait(struct lpfc_vport *vport,
                           struct lpfc_nvme_lport *lport,
                           struct completion *lport_unreg_cmp)
 {
-#if (IS_ENABLED(CONFIG_NVME_FC))
        u32 wait_tmo;
        int ret;
 
@@ -2164,8 +2164,8 @@ lpfc_nvme_lport_unreg_wait(struct lpfc_vport *vport,
        lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_IOERR,
                         "6177 Lport %p Localport %p Complete Success\n",
                         lport, vport->localport);
-#endif
 }
+#endif
 
 /**
  * lpfc_nvme_destroy_localport - Destroy lpfc_nvme bound to nvme transport.