From patchwork Mon Mar 4 19:39:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 159570 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4138395jad; Mon, 4 Mar 2019 11:39:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwB+fO7paeVMh1sv4cyz40Xj7HlE7BZ87hUs+0X0yCIH6W69ipzYO4jRZfaBBEA6BmGr65Y X-Received: by 2002:a17:902:1aa:: with SMTP id b39mr22048497plb.317.1551728376676; Mon, 04 Mar 2019 11:39:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551728376; cv=none; d=google.com; s=arc-20160816; b=jWsMQLqov3S9Y1I9mftfRwZXEGO+JsIcIsTkDwK3pWLvdIQO3xBzqH54vB0ufSneeM xYKjUc4oM+XiikPx3vsZE8+Zi6fKUjjDALRxyvdSAGd3yqQoW6Rr2nnLNaGqJCOcs3ut D40fGeA4Y32xY3182emE+2lTYDTnsZV89HtQcFqGEFML2Da4XX5jPvsFsVNZnPjBgNVx A3JUvrbQqaJj64oOPlLtZ5DbdzVeC8CP67bdGhmlfFgKYfpSpcfL/UKbY5fZamBva2ev L/iPA7sRcS3dFQfMB4ok0v78DSRI0BdMbmB2ZaCoNLWz051bO1+BS2loVNizrNNYtiAh HefA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=oOsjh5n+Oaxfk3c22kkd8KuUXJL0wtBF/rt2qN3so0k=; b=cmSGSvDL+h/l4AwnpJFi7jRgFO1eACrgBPE6vIBHjETfIRAXXKaUcCaxul8f1jn/TR qc/MI3xzDl6KKvqw20rgv8w5eNkZGyuJKr8b01s9vZnQ8A7hlI7kBJoK6LYLSMdKxmsn xNTeje5HA7rHFrBT3sqJGbbq3wnZPKnLJqzrhso6eurOYZH9rQaDnevRJjFBllNPrmpa 8U2UgxDgVJY6uBrqCYAjUZ18GdXGy5UQv+uBq1juTjxOsJhOdc4hBjxFzFh7dzBekyJA zS1hDbNYs3yJhHACi7GH63DJO3E/rEqHJLJyahVkgc266ihSlJUbPFYcmNfLkmdkkNV3 Wq5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si5400200pgp.286.2019.03.04.11.39.36; Mon, 04 Mar 2019 11:39:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726098AbfCDTjg (ORCPT + 1 other); Mon, 4 Mar 2019 14:39:36 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:60275 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726056AbfCDTjg (ORCPT ); Mon, 4 Mar 2019 14:39:36 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MmlfS-1hQpyw2Gta-00jpZd; Mon, 04 Mar 2019 20:39:20 +0100 From: Arnd Bergmann To: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Arnd Bergmann , Hannes Reinecke , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] scsi: lpfc: fix unused variable warning Date: Mon, 4 Mar 2019 20:39:08 +0100 Message-Id: <20190304193917.702601-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:3lcS5bnwBIBaf3xIyea8qigY2ujMKZ20fLudKb61gEv7aOxvrZm C6m6nFc82uZDEfN1Xdk1lKh8ZMwWkW9vB9GUv7cs2z1qQnRGWpZTN286tagmA+TSFXhMUo7 XkWE/uznmgaY6av5XYrlrzNyRTP13x++yyJg7iQtGwoB53FhyAM3QBsYRIPWUX5mQu/ApJx fmpty0vrZiI481WgHWrbQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:/B0WMM4Rr1k=:TqhyD+ZpXGpSJ9dzO/e9h9 srhrIjMrVwptC8hKdSsyZVAN6zLPgMLTA7BhslS293HmfFu31Jirq0qSbHyxL5+7sSqPHV5jG Za/wJmxg+7F/tr07ABVitwTpy4xKLTIXzqYHMoYZEEBxANm2bGuO7U3U+auWvqNBmq0SIUXtr u2lLRtv5LX8aupMcV5ZRIL6jzT3vA+zTdaovU+SKTsuteF5+ZzaUqjfJ/IJePau9w/xySD7cX kG44vzwG7ZdgeaR/Og58RTKuKn1ILVVgPkReot9XgS63XSZGUuI4ovs76c2/7ne5TKy3DpJEu nxZNTCPwh8lRB8f0AbE8oydhvNAzUncDiSKEviawfLe+wSL1UyK/P5G2RlUvleEDsTXw2cC+G OGErLrh2nGfgJNflhRZzNehSPRiCr+SWNkUfKhzcxGsHM2fWeXISMJv6K0gppok3yKRtu4L6p wZtAvv/KKxZjxS1nkMXVB5kS+ecb+u2P+82kxNUc68C9AelkJy6CgW8greYezYGxQiP5bj1Op 6sbjJQa0ORFxxyM0rFrD94TwvbX5U5VxnxZeHSg/wvJXX55Rpsid/2YQU7IxAF4v5mB2Q2Ee6 IYC+ZGvwUiARODxYdaAbbhyX+adejjXzzGHiM9q/kOhjAJ+WvPuLqLW0xCoKKI6GktyVdMtyQ kki47v8a45cPJUuraIR/rycClQXLfxJKPEF3/RzAn0JySFt5L+udKmUsMLdolVy7szS7gCV9q RSVBCgMXytBtoHzaMo/x9fri3mLtXOHJ5D5ITA== Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The newly introduced 'cpu' variable is only used inside of an optional block, so we get a warning without CONFIG_SCSI_LPFC_DEBUG_FS: drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_io_cmd_wqe_cmpl': drivers/scsi/lpfc/lpfc_nvme.c:968:30: error: unused variable 'cpu' [-Werror=unused-variable] uint32_t code, status, idx, cpu; Move the declaration into the same block to avoid the warning. Fixes: 63df6d637e33 ("scsi: lpfc: Adapt cpucheck debugfs logic to Hardware Queues") Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_nvme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.0 diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 72cb8ad9027b..d16ca413110d 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -965,7 +965,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn, struct lpfc_nodelist *ndlp; struct lpfc_nvme_fcpreq_priv *freqpriv; struct lpfc_nvme_lport *lport; - uint32_t code, status, idx, cpu; + uint32_t code, status, idx; uint16_t cid, sqhd, data; uint32_t *ptr; @@ -1139,6 +1139,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn, lpfc_nvme_ktime(phba, lpfc_ncmd); } if (phba->cpucheck_on & LPFC_CHECK_NVME_IO) { + uint32_t cpu; idx = lpfc_ncmd->cur_iocbq.hba_wqidx; cpu = smp_processor_id(); if (cpu < LPFC_CHECK_CPU_CNT) {