Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9622005ybi; Wed, 24 Jul 2019 07:13:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3OXpwAcOc08XfpgZcDuPbwYkroHDjiXWY07x03c2kpwap5aI3+LqE2OLbj7GD4k9YW9kw X-Received: by 2002:a17:902:6a85:: with SMTP id n5mr80241441plk.73.1563977618578; Wed, 24 Jul 2019 07:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563977618; cv=none; d=google.com; s=arc-20160816; b=GrlAlrtn4nggyTc3LuK8vZakB/OiEaNqicBEn2AR2rY3jf7SlPJO8FnmDGZ5mD0wCP 1swWkevn2wmnJMG2gPENeMaP3KaScr331RIZkJRnKYmCDgUYtZMEn8R6tIo74Ug7QhEr yGAnESNo/SlEr3yKTylP7Q6kNR563WBqJSy0kj65PF5Vj10ZU3rQvv8IFVKnD85zvq0m oD6UqXXlml/GeDoo0tRg9p2KXiVOSCVI/7Fm8VXWSzFnj9niAcWpkGm6EKbeveu1lV69 yYCdZsU8euyTFulpT4uheJHWXcO9Nak4FMqGiz3hJ8e35zZv0bMYwBDy3LK8inZakdJY 2T+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=C+gICzXXVQ6MZJ9SFP0GDAqgY+/NLr/TOllguKEnlQk=; b=RK2+WoLChP4fCUSvMHfBBeN9VwwRuNStNNagtN1Vc9YoXwViAla3UWK0ZDgi8YZeKl MQffWh9cQU8WOxFWdATNGSEgguEAwHn0ppMhllEOEj8p2H/YxCQxil3JjJKMyRQheHyn 7XjkYPvN8RVGKTMm17x3e3zEcbqMFQO9Vek2tfVAsp/CR3ElhfayVqylKbXu96s94vgy 6yEp95xdGcefjXALIWENpYli9G2W6MeMU+51tJcwwyFccFDDRzl0rQEelR6brw7Kk1JO yoXz8i5lr8aZyNYMM8BLgC2A8o9GD7OVu9tRj5Sasv4n+ahzC3AziNUY+WE2fV7W2omN VAow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 d5si13418883pla.17.2019.07.24.07.13.23; Wed, 24 Jul 2019 07:13:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728337AbfGXOJE (ORCPT + 99 others); Wed, 24 Jul 2019 10:09:04 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2753 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726178AbfGXOJD (ORCPT ); Wed, 24 Jul 2019 10:09:03 -0400 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 From: YueHaibing To: , , CC: , , YueHaibing Subject: [PATCH] xen/pciback: remove set but not used variable 'old_state' 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 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 offset, u16 new_value, { int err; u16 old_value; - pci_power_t new_state, old_state; + pci_power_t new_state; err = pci_read_config_word(dev, offset, &old_value); if (err) goto out; - old_state = (pci_power_t)(old_value & PCI_PM_CTRL_STATE_MASK); new_state = (pci_power_t)(new_value & PCI_PM_CTRL_STATE_MASK); new_value &= PM_OK_BITS; -- 2.7.4