diff mbox series

lpfc: Fix a recently introduced compiler warning

Message ID 20190405161410.158770-1-bvanassche@acm.org (mailing list archive)
State Mainlined
Commit d964b3e5343851fc6e7d8272d643007a29788139
Headers show
Series lpfc: Fix a recently introduced compiler warning | expand

Commit Message

Bart Van Assche April 5, 2019, 4:14 p.m. UTC
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>
---
 drivers/scsi/lpfc/lpfc_nvme.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

James Smart April 5, 2019, 4:28 p.m. UTC | #1
On 4/5/2019 9:14 AM, Bart Van Assche wrote:
> 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>
>

Reviewed-by:  James Smart   <james.smart@broadcom.com>

-- james
Martin K. Petersen April 9, 2019, 1:26 a.m. UTC | #2
Bart,

> This patch avoids that the following compiler warning is reported with
> CONFIG_NVME_FC=n:

Applied to 5.2/scsi-queue, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 8a123ff98250..9d99cb915390 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -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.