From patchwork Tue Jul 21 16:41:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11676147 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9540113B1 for ; Tue, 21 Jul 2020 16:42:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 741DD207BB for ; Tue, 21 Jul 2020 16:42:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IqlI+0Ot" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 741DD207BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61C8F6E29B; Tue, 21 Jul 2020 16:42:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 35A206E29B for ; Tue, 21 Jul 2020 16:42:49 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id o11so21855009wrv.9 for ; Tue, 21 Jul 2020 09:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CO8ltPArAPUdBjw6bWGQZLeu5Bx+TgrPvU6n01tz240=; b=IqlI+0Ot+ZGos0Pp8ZRMuoIUJu6pSsr8FMdpqo50jn/q3zZpH7TZ6Vq+f5Pxhyi9GN UnXYs2QsSxbWFJ/eRfnrT9q8pyIGLN0A3mgDmdPPOh51XJW3lHaRcRFkzmQcwndgaoy0 oPFlQ28ri2qn9nTPKm+2VWQCD1J4eNRYNHGSq+w2ADI9EhjGFLha2ywEIgfGk5zFL8vY CEKzLsSWACDvw2Ts+CE7im8G+WTi6EP4MzKdWU2+HnxjlxJw+4IQ+vr11RhXfmYF27dN NRpW1mpVFQvei+y9GrufbPbuXHmDFoTzkJk/5L8w9jbG3a1fAwxynu2sk4UtDsEf1MjN MuFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CO8ltPArAPUdBjw6bWGQZLeu5Bx+TgrPvU6n01tz240=; b=J93Wph5HO5ISpF8DU3neXsQjeEDZXOCpnYpXdW1XhxLIjKRxTwHkmyN1cS32F5mGHX R2OvF+Yue3WBS/yII112bIM2aE7KHi7Lkpp4O9D3/2qk9YlAgPQw7mvq4eBQnIURo5N4 c7UqGhiFQouYP9jQR8ROT8U64o2B/6pHvE2eASEPA4JI2Mg5g+NIY/Nj2h+cznCJMsso w7L/wrFrfiRmqmdBudnq1sYT5pVSwmlETkQDdRvdn3NGVSDXco5c7lrGn5kwkbXSUx/B 5hu91zEVlLI1ORNXW5zgwI72LWKcjwsncysvGJZzPrWwmAn9Ebb5bGFcoG+TBcfCuDRG CXWA== X-Gm-Message-State: AOAM532guitWvhznQhGZc6b6Pi3c75JlTvGV9rECce6AeNuhbdE/4U+I EDzihX7EBejuBjBJVWcewDSuRA== X-Google-Smtp-Source: ABdhPJwNVbDAYojp2CjDF+i1OzxbUBejGrOQEVglMRAPBlKuVKe0LZXQjaN8lWErukT81SQphXvdzw== X-Received: by 2002:adf:f10a:: with SMTP id r10mr26816377wro.406.1595349767955; Tue, 21 Jul 2020 09:42:47 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.94]) by smtp.gmail.com with ESMTPSA id m4sm3933524wmi.48.2020.07.21.09.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 09:42:47 -0700 (PDT) From: Lee Jones To: jejb@linux.ibm.com, martin.petersen@oracle.com Subject: [PATCH 36/40] scsi: lpfc: lpfc_sli: Ensure variable has the same stipulations as code using it Date: Tue, 21 Jul 2020 17:41:44 +0100 Message-Id: <20200721164148.2617584-37-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200721164148.2617584-1-lee.jones@linaro.org> References: <20200721164148.2617584-1-lee.jones@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dick Kennedy , linux-scsi@vger.kernel.org, =?utf-8?q?Christian_K=C3=B6nig?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, James Smart , linaro-mm-sig@lists.linaro.org, Lee Jones , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'pg_addr' is only used when CONFIG_X86 is defined. So only declare it if CONFIG_X86 is defined. Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_sli.c: In function ‘lpfc_wq_create’: drivers/scsi/lpfc/lpfc_sli.c:15813:16: warning: unused variable ‘pg_addr’ [-Wunused-variable] 15813 | unsigned long pg_addr; | ^~~~~~~ Cc: James Smart Cc: Dick Kennedy Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones --- drivers/scsi/lpfc/lpfc_sli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index c44eed709d5fc..278ea0d74b4a8 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -15810,8 +15810,10 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq, uint16_t pci_barset; uint8_t dpp_barset; uint32_t dpp_offset; - unsigned long pg_addr; uint8_t wq_create_version; +#ifdef CONFIG_X86 + unsigned long pg_addr; +#endif /* sanity check on queue memory */ if (!wq || !cq)