Received: by 10.213.65.68 with SMTP id h4csp1707001imn; Thu, 15 Mar 2018 07:23:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELsx0oBl8vNp0nB4rxA9EfJYj/bnxISBxvED8FFfeDwdk4DgZ9CExRqwOX5qN0L3iXl5bH0e X-Received: by 10.101.96.43 with SMTP id p11mr6916970pgu.430.1521123793721; Thu, 15 Mar 2018 07:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521123793; cv=none; d=google.com; s=arc-20160816; b=f7sRqFtaaxWGk/CFxliQAd5A0Q55yvMLIOj4ZhkpN9cLhog05TZvxdGJCKynEN7dOg Gl/sAMMPbaNXw9NVGsQC6gU8T+OFooYFMGO4XwF4QfptWjwGEepJXsDVHA4Lulejz4m7 g7FdP5YFIjI5a3OAmLWXJMcv/nXCcuS61LLu1PzpOo+9+0YUzDSForFZ+8uhSHbH3jke rAphKL5avp8zLzz62Txm492aWaUpBlG8RCUyiq9guYoaNCdV42Q9bCR+HENnwsrYxJKe OEm5Cu1Z0s9wtOuuT4LC4oApCukrItfxmuaEHYWbdJ9N+GKvKhFJHVnZ9G4RFOKjPdZd vVHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:msip_labels :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=rLA19yqYzJ+8A+Wj2jCWvHNQ0cMNBlXKoj+NW5wNlFY=; b=07PyMvhBzPrqY2i4GXJ5kgY2Qo/hvj6mfILj6vjUGBifUlKoKFn2htwybSVGwGlrPu mgohhm/ZXf0lPCN4hhbF7vgQgroJzAZvyu0XG+E7hhV2N+nK3DJrhd+kQF13qq//j2sK IbgekseYkHx5oBK5N3wOfXjMnr5IkVEzS1KJKZbTLWp3R02KWsYs7DwHVhFBrr5pZb5b Jm6v2cFRr5QMYPZzqSolilktwcHXAQV6yeejCDUXlg77j1niqcF0UgEROTdmceeAdbHk VUtKIkWuU5GirbB7nnZOcVKT8s6NoBt/6bTFbazVbHYj+tClscMycD46YrvHUeeVRHeN jsTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=czYYuuA6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si3441343pgp.193.2018.03.15.07.22.59; Thu, 15 Mar 2018 07:23:13 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=czYYuuA6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932122AbeCOOWH (ORCPT + 99 others); Thu, 15 Mar 2018 10:22:07 -0400 Received: from mail-sg2apc01on0093.outbound.protection.outlook.com ([104.47.125.93]:55200 "EHLO APC01-SG2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752548AbeCOOWD (ORCPT ); Thu, 15 Mar 2018 10:22:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rLA19yqYzJ+8A+Wj2jCWvHNQ0cMNBlXKoj+NW5wNlFY=; b=czYYuuA6yEDmKcPZRw2tkUM+59lgCLO738qJafzqAMe4sMtolQyRwxMm5C5SUBa2Nrl2UZFQZDItP2H6UHtcJkTQy5jzzdKU9u6YFfz5DJvxnzY6nTGUYgEaJm4t4z6ZCfuXgDH56Zu974Tu+OXyFFKV1xFkl8jT+THLg4EKubk= Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM (10.170.167.17) by KL1P15301MB0069.APCP153.PROD.OUTLOOK.COM (10.170.168.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.6; Thu, 15 Mar 2018 14:21:43 +0000 Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) by KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) with mapi id 15.20.0609.006; Thu, 15 Mar 2018 14:21:43 +0000 From: Dexuan Cui To: "lorenzo.pieralisi@arm.com" , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" , KY Srinivasan , Stephen Hemminger CC: "linux-kernel@vger.kernel.org" , "driverdev-devel@linuxdriverproject.org" , Haiyang Zhang , "olaf@aepfle.de" , "apw@canonical.com" , "jasowang@redhat.com" , "vkuznets@redhat.com" , "marcelo.cerri@canonical.com" , "Michael Kelley (EOSG)" Subject: [PATCH v4 2/4] PCI: hv: Remove the bogus test in hv_eject_device_work() Thread-Topic: [PATCH v4 2/4] PCI: hv: Remove the bogus test in hv_eject_device_work() Thread-Index: AdO8O8t/mCo4wvQ+QfmRTFskL/RTVQ== Date: Thu, 15 Mar 2018 14:21:43 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=decui@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-03-15T14:21:40.8955883Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General authentication-results: spf=none (sender IP is ) smtp.mailfrom=decui@microsoft.com; x-originating-ip: [2601:600:a27f:df20:d8b5:442c:6a7d:25c6] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;KL1P15301MB0069;7:wplNC3JkFrbrH4fwkA4QFxKsr43TRYwK7Q3jFpiqtk+gU/f32lgD66HkDdqqleEa0izodZ3UUlEvBRqp1gsmhdMZZsr4iK83fFAUYykr+lZVAjwHlGDjjX4kVAxvEV88yqmCOzZJkbVabxN6nvMdMLuFryqCnyO2eGXdUluMaxIz/NRsiOkscQjISnu24x013B25PuAIS5z9rg+14V25/oXc5EqFx682S1KkNL+TkVwtFbo5h89/PMonr++TMChk;20:K0pkmmTX28IVTqnvpLxIHEwH4vCIsZYvO4x/euP14bohZ+/T1AdtWcqi77op/9GlDLn79qiTdpdfn7zcWLqP7AcEbnY2ugX3UBGC2QivtMXgK3ang8SU67Z/fhU02fXdKi0TDbeI64CWxiLJzqjfG4GIiDe03xFr/CIqZD2e2OA= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: bdd3a580-25fc-43eb-2ad7-08d58a8013d5 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:KL1P15301MB0069; x-ms-traffictypediagnostic: KL1P15301MB0069: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501244)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011);SRVR:KL1P15301MB0069;BCL:0;PCL:0;RULEID:;SRVR:KL1P15301MB0069; x-forefront-prvs: 0612E553B4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39380400002)(346002)(366004)(39860400002)(376002)(199004)(189003)(105586002)(77096007)(8990500004)(7416002)(2501003)(102836004)(106356001)(1511001)(6506007)(5660300001)(186003)(3280700002)(2201001)(4326008)(8936002)(86362001)(575784001)(33656002)(3660700001)(2906002)(10090500001)(68736007)(25786009)(8676002)(81166006)(81156014)(6436002)(6116002)(7736002)(74316002)(46003)(305945005)(107886003)(110136005)(54906003)(53936002)(86612001)(478600001)(22452003)(14454004)(316002)(6636002)(97736004)(9686003)(7696005)(99286004)(10290500003)(55016002)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:KL1P15301MB0069;H:KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 75u67U1MU9ZOwGz523ysK/lLp6zlllregiwb/vyo6blODdMySbAMpDBpLj+xSovLC6dAieCw39cWM7wx2AqY4n073VgdWN3tylir2TLOzpykmntviDXtuDfos0pCjk4Em+lhLEBHPFe6T+YHh+o13WPcVLYSBFwojALTeC3pR5uCMVOW8KthYSKpgYj9rCGb/Gteec4XHDQsl4T4Qn56PDkJVDZemzDinKloqZHEnGVdVtVAD6WkSyf/o/X3PV8l+JsMY+2+zP66LFhi4y2oix9si4C9PNFZ1rqu//XZg3FdpCKBbmzbGDl5S97uecseq43os0aASzTkeI9vhZZKOA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: bdd3a580-25fc-43eb-2ad7-08d58a8013d5 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2018 14:21:43.0664 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1P15301MB0069 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When we're in the function, hpdev->state must be hv_pcichild_ejecting: see hv_pci_eject_device(). Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Acked-by: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Jack Morgenstein Cc: Stephen Hemminger Cc: K. Y. Srinivasan --- drivers/pci/host/pci-hyperv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 28fce2be0a5f..1d2e1cb617f4 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -1854,10 +1854,7 @@ static void hv_eject_device_work(struct work_struct = *work) =20 hpdev =3D container_of(work, struct hv_pci_dev, wrk); =20 - if (hpdev->state !=3D hv_pcichild_ejecting) { - put_pcichild(hpdev, hv_pcidev_ref_pnp); - return; - } + WARN_ON(hpdev->state !=3D hv_pcichild_ejecting); =20 /* * Ejection can come before or after the PCI bus has been set up, so --=20 2.7.4