From nobody Sun May 19 00:42:58 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1563977424; cv=none; d=zoho.com; s=zohoarc; b=bi3OfPbXy+I7ncJnwRyP0eTW5jmEej06JAAVvV9Ce3bUV6daSqnlMiU7WX6PosApSX4w2NimepDX9lNS5o2hOow4KYe7rD03dzXLlW9in3SMrkZdFvb4U+WMgYiussjnF8Fgsp9kUGEJ/C8ZfwTCs1r8lDUO4M3s5BiLorsm6yE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563977424; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=4WtIMR1jtTi6MhRmAVNZbI3f6p5MwvNl8rRrFidCRx8=; b=bsT4l7TF+twXC9uIOwi6oqwZDnERG8eJHBmFtwbDm1F3x754pqPq8i+ewVmXZhAwQX/0bOmojFDxqXjlpbNSWVu8HLOD+zIaDzz4o0KxA9mOmeFuHrgcr5pn8ynH3qQxvPlEI+G82srreHXlmvRnXdENJUrQzwhY4kNdOzDU4ho= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1563977424204374.25331537996794; Wed, 24 Jul 2019 07:10:24 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqHx7-0006Bk-EH; Wed, 24 Jul 2019 14:09:09 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqHx6-0006Bf-9I for xen-devel@lists.xenproject.org; Wed, 24 Jul 2019 14:09:08 +0000 Received: from huawei.com (unknown [45.249.212.191]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 97d005fe-ae1c-11e9-8980-bc764e045a96; Wed, 24 Jul 2019 14:09:06 +0000 (UTC) Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B2EAF9EA050138488E51; Wed, 24 Jul 2019 22:09:02 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Wed, 24 Jul 2019 22:08:56 +0800 X-Inumbo-ID: 97d005fe-ae1c-11e9-8980-bc764e045a96 From: YueHaibing To: , , Date: Wed, 24 Jul 2019 22:08:50 +0800 Message-ID: <20190724140850.10760-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Subject: [Xen-devel] [PATCH] xen/pciback: remove set but not used variable 'old_state' X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, YueHaibing , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Fixes gcc '-Wunused-but-set-variable' warning: drivers/xen/xen-pciback/conf_space_capability.c: In function pm_ctrl_write: drivers/xen/xen-pciback/conf_space_capability.c:119:25: warning: variable old_state set but not used [-Wunused-but-set-variable] It is never used so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Boris Ostrovsky --- drivers/xen/xen-pciback/conf_space_capability.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/xen/xen-pciback/conf_space_capability.c b/drivers/xen/= xen-pciback/conf_space_capability.c index 73427d8..e569413 100644 --- a/drivers/xen/xen-pciback/conf_space_capability.c +++ b/drivers/xen/xen-pciback/conf_space_capability.c @@ -116,13 +116,12 @@ static int pm_ctrl_write(struct pci_dev *dev, int off= set, u16 new_value, { int err; u16 old_value; - pci_power_t new_state, old_state; + pci_power_t new_state; =20 err =3D pci_read_config_word(dev, offset, &old_value); if (err) goto out; =20 - old_state =3D (pci_power_t)(old_value & PCI_PM_CTRL_STATE_MASK); new_state =3D (pci_power_t)(new_value & PCI_PM_CTRL_STATE_MASK); =20 new_value &=3D PM_OK_BITS; --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel