[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210617233759.2355447-1-nathan@kernel.org>
Date: Thu, 17 Jun 2021 16:37:59 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: James Smart <james.smart@...adcom.com>,
Dick Kennedy <dick.kennedy@...adcom.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Gaurav Srivastava <gaurav.srivastava@...adcom.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
Nathan Chancellor <nathan@...nel.org>
Subject: [PATCH] scsi: lpfc: Reduce scope of uuid in lpfc_queuecommand()
When CONFIG_SCSI_LPFC_DEBUG_FS is unset, uuid's declaration is not
present, resulting in a compiler error:
drivers/scsi/lpfc/lpfc_scsi.c:5595:3: error: use of undeclared
identifier 'uuid'
uuid = lpfc_is_command_vm_io(cmnd);
^
uuid is only used in the if statement so reduce its scope to solve the
build error. Additionally, uuid is a char *, instead of u8 *.
Fixes: 33c79741deaf ("scsi: lpfc: vmid: Introduce VMID in I/O path")
Signed-off-by: Nathan Chancellor <nathan@...nel.org>
---
drivers/scsi/lpfc/lpfc_scsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 46bfe251c2fe..e8af51e38614 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -5457,7 +5457,6 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
int err, idx;
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
uint64_t start = 0L;
- u8 *uuid = NULL;
if (phba->ktime_on)
start = ktime_get_ns();
@@ -5592,7 +5591,7 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
LPFC_VMID_PRIO_TAG_ALL_TARGETS)) {
/* is the I/O generated by a VM, get the associated virtual */
/* entity id */
- uuid = lpfc_is_command_vm_io(cmnd);
+ char *uuid = lpfc_is_command_vm_io(cmnd);
if (uuid) {
err = lpfc_vmid_get_appid(vport, uuid, cmnd,
base-commit: ebc076b3eddc807729bd81f7bc48e798a3ddc477
--
2.32.0.93.g670b81a890
Powered by blists - more mailing lists