archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <>
To: James Smart <>,
	Dick Kennedy <>,
	"James E.J. Bottomley" <>,
	"Martin K. Petersen" <>
Cc: Gaurav Srivastava <>,,,
	Nathan Chancellor <>
Subject: [PATCH] scsi: lpfc: Reduce scope of uuid in lpfc_queuecommand()
Date: Thu, 17 Jun 2021 16:37:59 -0700	[thread overview]
Message-ID: <> (raw)

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 <>
 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;
 	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)
 		/* 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

                 reply	other threads:[~2021-06-17 23:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] scsi: lpfc: Reduce scope of uuid in lpfc_queuecommand()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox