Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4875815pjb; Mon, 27 Jul 2020 07:22:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXS2aYSDM05sm1J48TH32eqF0sgGhjcplYt5xKHQffnxqkVrRRH4DXYUGcSKF9xBozkTMl X-Received: by 2002:a05:6402:354:: with SMTP id r20mr22610405edw.32.1595859749002; Mon, 27 Jul 2020 07:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859748; cv=none; d=google.com; s=arc-20160816; b=xaoP25xfZ0XQPf1n64iZkB8TlYDbHR2UM7McMFj3tojiRnox8zxSvRnBK0IMMc0OKq VPYNTlNOkFlr4Mk4Lc+agJUCF6kovmQtcIVEAFYeljiksm8c9nF+py3ffTn+eKd4ZEFZ lj6+msP8YxOuUuR8OFFzU+qjc9Fr4n5udtK5clLuSGAQ3ob5W4gAQ3Mjfiw6czm641lN X2z0J5wDPi04sVlPwIKbQ5QqJ1lJuLEsplNnA9OVXk1UyLMbXVZEda9dZhP6ZeuIhP2w GapErNHCahX/lnQIBPWTz6Z486TdZ2G5JoKNohbO1XuKEi6PitH/Lt5ePkOI2NG3Kgct YKhQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=olvLb/dTPMfIJJXeJe+Ky/B1TIT+Per8o9+ttFzxJHE=; b=Am/nDQotkC/RmFWX63EzetTYGLR0bJKVr8n91XEII7x0BjhWuqkykmQeMnkm1kVTa7 uB4yUZXqFeFqOYjTrZ4mvjKeXT5hK/rqlK8iKOQKFWw7owh2D3qSZLI/xDKWhBJoGvAB 2ne4zYAPVIsYd8hl9xEM2rn2eM1TfAvlYyy4vBXmU/BflFfH6q+Tfepsb+8mjDddxA8c +zJZrys86Px/ao2Qd22hYk6jGdDAjXBCs3WlN0NkocTNNoZ8QJLJRR5gfCWoUZdRtXje XDyzceFMWe0oKMAVbR0qWW7t6hqiu+1eBaV/RBipkzRVH1N7NMIAd4otsCPb9ZCsasoe wwjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QC+9M1kA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e23si5693132eja.122.2020.07.27.07.22.06; Mon, 27 Jul 2020 07:22:28 -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=default header.b=QC+9M1kA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731583AbgG0OUk (ORCPT + 99 others); Mon, 27 Jul 2020 10:20:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:48930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729871AbgG0OUi (ORCPT ); Mon, 27 Jul 2020 10:20:38 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BB18E2070B; Mon, 27 Jul 2020 14:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859638; bh=19mQB+PQDrdF584KAX767sTni5YlZ0N4xfTr5X9tToo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QC+9M1kAoG2BafWvk3Ld4UroETstJMsStKzi/m5eD5CSdGK09H1O/BIQ4bxZWgA8l EvcmewoYEVnqGiRy91x/3ibkXmh5SM+IvS/kS080XRTAEfvw+M3untPmbqNx9cOV8F o7AKEb/DDIRDamjSyo0yDimbISZDIwadLixQRcu8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kbuild test robot , Xu Yilun , Wu Hao , Tom Rix , Moritz Fischer , Sasha Levin Subject: [PATCH 5.7 046/179] fpga: dfl: pci: reduce the scope of variable ret Date: Mon, 27 Jul 2020 16:03:41 +0200 Message-Id: <20200727134934.913345380@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xu Yilun [ Upstream commit e19485dc7a0d210b428a249c0595769bd495fb71 ] This is to fix lkp cppcheck warnings: drivers/fpga/dfl-pci.c:230:6: warning: The scope of the variable 'ret' can be reduced. [variableScope] int ret = 0; ^ drivers/fpga/dfl-pci.c:230:10: warning: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Fixes: 3c2760b78f90 ("fpga: dfl: pci: fix return value of cci_pci_sriov_configure") Reported-by: kbuild test robot Signed-off-by: Xu Yilun Acked-by: Wu Hao Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Signed-off-by: Sasha Levin --- drivers/fpga/dfl-pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c index 538755062ab7c..a78c409bf2c44 100644 --- a/drivers/fpga/dfl-pci.c +++ b/drivers/fpga/dfl-pci.c @@ -227,7 +227,6 @@ static int cci_pci_sriov_configure(struct pci_dev *pcidev, int num_vfs) { struct cci_drvdata *drvdata = pci_get_drvdata(pcidev); struct dfl_fpga_cdev *cdev = drvdata->cdev; - int ret = 0; if (!num_vfs) { /* @@ -239,6 +238,8 @@ static int cci_pci_sriov_configure(struct pci_dev *pcidev, int num_vfs) dfl_fpga_cdev_config_ports_pf(cdev); } else { + int ret; + /* * before enable SRIOV, put released ports into VF access mode * first of all. -- 2.25.1