* [PATCH] scsi: lpfc: Reduce scope of uuid in lpfc_queuecommand()
@ 2021-06-17 23:37 Nathan Chancellor
0 siblings, 0 replies; only message in thread
From: Nathan Chancellor @ 2021-06-17 23:37 UTC (permalink / raw)
To: James Smart, Dick Kennedy, James E.J. Bottomley, Martin K. Petersen
Cc: Gaurav Srivastava, linux-scsi, linux-kernel, Nathan Chancellor
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@kernel.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-17 23:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 23:37 [PATCH] scsi: lpfc: Reduce scope of uuid in lpfc_queuecommand() Nathan Chancellor
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.