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: 246911 Delivered-To: patch@linaro.org Received: by 2002:a54:2c11:0:0:0:0:0 with SMTP id g17csp2711550ecp; Tue, 21 Jul 2020 09:42:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzH3ZUoDYJwwrgJ0qFtMppHk3ixA6KExKinGvn9Y0VJehLGJrqIrXjPhkQMymaO7CAcQkBF X-Received: by 2002:a17:90a:6acb:: with SMTP id b11mr5662083pjm.71.1595349771530; Tue, 21 Jul 2020 09:42:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595349771; cv=none; d=google.com; s=arc-20160816; b=hZujhPLg8NZFg+QCGGOllYxAYjWrRpWf/1HRgBaRzgSCeTkMs5v9hsguz+ji8JMW80 kd6bMfJa/4sIgMWdiUyHEJ51F7mcpr1QWh5krlrmqUsVbE10tvgJ/gfQnBSqnO16zBHv HXsWZar205HJziLoPiRm6cLMbv/baTmw8I0ezXmV5y3hbpCOhOwDKf6pqaLTNmNtnFTn jMZbdcphZ5KtLT5E2X2eo2ohc5oKMutBt/r32/JZ6rAFA2wKGluh7BCfDqdJAwcirfGy XHsAMgtywts42bAWLMZET5TC1A6VFNoJi8l2x0J7s+2jeiEnIV0COC1w0aG5NgGN7wt5 iIKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=6KK+NjOaibADVPellm/Md6VDrCDPZQ1iCm3DYKkJLF4=; b=x42E2a5/TiHfWlk8gE2aP91AGMM62pOFh9d0CHvQRh7bCZ5uE5HYFCZu7IB/AF3ljd O4WlQFFmOK4P/C2R2D3wbVP6U0lIXERaZHq5YMb1U4FhMnbjDqB7nlD2A/yL7UH75aMk T32VGJozM6oWfGqsysOAO980GbkyI3YrBiMsPGRyEi51+VMPhrPTpskIUWnSc780O5Mh GIQ7Pu3r8/qOOla0yzIiagicUe3g/2Rs8YFYzV6VABMDaNPizLhScxmIkQel9OgZD/zk RfYu9AbtRrWktSrbQKVqSS74kirspKpQKrduBf62v0qp9RoSvEqkw3XRHydeTGZ4kC95 5vsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IqlI+0Ot; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id l5si12669415pld.409.2020.07.21.09.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 09:42:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IqlI+0Ot; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.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-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)