Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1005125pxj; Thu, 17 Jun 2021 19:57:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6/JsZ7K9Cvs8ka/aBZ/wTjeoOrPPX88RL0l8ztr2wUxCcxUlm1nSbcfas22ODCkafLZkS X-Received: by 2002:a17:907:2059:: with SMTP id pg25mr8249731ejb.130.1623985036750; Thu, 17 Jun 2021 19:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623985036; cv=none; d=google.com; s=arc-20160816; b=v2h23p8p5Pa0DyZ41eNtCJXoybTz/Mh0QY2wYOLe4Jd5RTo3t6iFpjmR+opEfKwXDP HrgX8fs1ITMZO8KlVixB7gZdYahERV2Te8AO5ng0pBWo0rGMdIEYssG1EukK1vXi3p3J uu3HRuGm+OetDJq+4YVP59j6oyGRHmbixQrfuXMsMZiINopl0qTniRK9/xdECkkVTmha juAHWqN4cxI+wbsvnmE1CuoE9vCG80uR15KEIqQEg5mJMgpWHVay+jt3brsYKGjgg7rd DwT3O/uLiR7R6jqngsO/BI6OlX8e2OPxqm6cejWVF/yLP/P0lrebm0+hO3fwj2R15cDk GQ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ouZ7rUKrFnCLTsl39so9inUFwsEO0oOqRDCRL27jv+8=; b=lWLqYpfe6Y2Vq8GDDEy6REwAPw6/OvkecDWzmogsue/3vMaRBPuVC4oj2mokdqdCSE Ht+qQTT+Dulur20FA6/I8AZv+zbbCwl1I2/g0cnRWTHUvjKsxOrgK8kCYZ13lcMceq+7 HSV/m1zHhbLrZghQlEhxpwpE2dE2oOUf8tyDhJiY/7dXqB/fndbIyd5LT3gU4okc3Enh MbeAoJ4bY7Qj/12XfuhJcQIdSYeMxCJqy1mR92Fq6loJ2Q/2Lb7OTTCSzyYGgpEngoaM zfp4EkCTyDT6IAgFKuU3Cbuj9t+cYnJWxTFWP50tZ3Qx+MIb6rAxIkiALc26oMIM0V1K wkSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B8l5pCGD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si7578648edl.304.2021.06.17.19.56.54; Thu, 17 Jun 2021 19:57:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B8l5pCGD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232016AbhFQXkS (ORCPT + 99 others); Thu, 17 Jun 2021 19:40:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:52328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbhFQXkS (ORCPT ); Thu, 17 Jun 2021 19:40:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2566C61184; Thu, 17 Jun 2021 23:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623973089; bh=KiD+BfJ+qYLwA/lIAGT2/IP2dL1kIspW0vUrVZZ4zyE=; h=From:To:Cc:Subject:Date:From; b=B8l5pCGD0pgflCpjM0LQSOHGF2jPusPjl3MDXtyy3XTjEG3IAOKddf95MPxHkEO0t CFJCTIixeMzjx40hNYKt2oLZZx+sOFN65yO2ELfby6qpZlra056DM/dzsIKBgraz1z 322TYvS9iUUTeNKLphmx2Qhr/Eg2O4fjDdG0uMsrL6jlxxTmJok+p8hwnvyGO46gKM Vh23tBoPHfAr4/pBtO1ZdAgcJf/iBUqQAin3xHAeesZEO57mhR/9SIH/rp+SJEbQsk zTkaZEXwq/KLnrEaFJuTGO4E4SlQLJqddPovESsHxod8V5CJGLpXwazQCrsklOsDG8 BDBiOfyfBx6GA== From: Nathan Chancellor To: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Gaurav Srivastava , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH] scsi: lpfc: Reduce scope of uuid in lpfc_queuecommand() Date: Thu, 17 Jun 2021 16:37:59 -0700 Message-Id: <20210617233759.2355447-1-nathan@kernel.org> X-Mailer: git-send-email 2.32.0.93.g670b81a890 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; #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