Message ID | 20180305192134.32207-3-decui@microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show
Return-Path: <linux-pci-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 667166037E for <patchwork-linux-pci@patchwork.kernel.org>; Mon, 5 Mar 2018 19:24:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 573D71FF65 for <patchwork-linux-pci@patchwork.kernel.org>; Mon, 5 Mar 2018 19:24:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C0D7204C3; Mon, 5 Mar 2018 19:24:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B86971FF65 for <patchwork-linux-pci@patchwork.kernel.org>; Mon, 5 Mar 2018 19:24:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752937AbeCETW1 (ORCPT <rfc822;patchwork-linux-pci@patchwork.kernel.org>); Mon, 5 Mar 2018 14:22:27 -0500 Received: from mail-pu1apc01on0111.outbound.protection.outlook.com ([104.47.126.111]:38336 "EHLO APC01-PU1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752931AbeCETWX (ORCPT <rfc822;linux-pci@vger.kernel.org>); Mon, 5 Mar 2018 14:22:23 -0500 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=+Hhm9N3q2CK6Hm61XPJ+Ffw7pjJ9voBSDqTWohRxk+M=; b=ITzLkvEj1NwhA1zrUGcK9wXrsjP0I5YB1Cm0kvHJj0D/STk70nl5mwGqguqeLdvadzKKn0zZncOQUmvR57alCDrLrM9yMaCbI5SeWPmLWGm3hZ8ipFzyH+dxxeno2ZcXbkHyQSUz7CPmv3XWgTWpCfF/J8XCtugKIIMyMbukWP0= Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM (10.170.167.17) by KL1P15301MB0039.APCP153.PROD.OUTLOOK.COM (10.170.168.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.7; Mon, 5 Mar 2018 19:22:15 +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.0588.001; Mon, 5 Mar 2018 19:22:15 +0000 From: Dexuan Cui <decui@microsoft.com> To: "bhelgaas@google.com" <bhelgaas@google.com>, "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>, KY Srinivasan <kys@microsoft.com>, Stephen Hemminger <sthemmin@microsoft.com>, "olaf@aepfle.de" <olaf@aepfle.de>, "apw@canonical.com" <apw@canonical.com>, "jasowang@redhat.com" <jasowang@redhat.com> CC: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "driverdev-devel@linuxdriverproject.org" <driverdev-devel@linuxdriverproject.org>, Haiyang Zhang <haiyangz@microsoft.com>, "vkuznets@redhat.com" <vkuznets@redhat.com>, "marcelo.cerri@canonical.com" <marcelo.cerri@canonical.com>, "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>, Dexuan Cui <decui@microsoft.com>, Jack Morgenstein <jackm@mellanox.com>, "stable@vger.kernel.org" <stable@vger.kernel.org> Subject: [PATCH v2 2/6] PCI: hv: hv_eject_device_work(): remove the bogus test Thread-Topic: [PATCH v2 2/6] PCI: hv: hv_eject_device_work(): remove the bogus test Thread-Index: AQHTtLdEG5adpemEOka8xO9TE6oauw== Date: Mon, 5 Mar 2018 19:22:15 +0000 Message-ID: <20180305192134.32207-3-decui@microsoft.com> References: <20180305192134.32207-1-decui@microsoft.com> In-Reply-To: <20180305192134.32207-1-decui@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.15.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=decui@microsoft.com; x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; KL1P15301MB0039; 7:ZHIuEH/jCC21s57m9kxGiw1qOSKoNf+armBta/Ct79BLVMYz5rscO6lSfYFoMz9VhfZzVS7oiI3GblSal65dgx/THmAQ3XHUyKJ39AssnxleNwPQHSSVxUHmiaZ5H94vq7v7bCpcCaQ8XiRkB1rQ48WvgTsb/WBXLtTmfDeJ3ug3nNcBLPrPN+nOT4hp0ZyGEhCWGjY8cHe+N1yC9yfXs1uk2aHpDtenRepSo8L62/VpplldHW78/iGK6GZ//rr1; 20:/OyH0CyQlkL5fwjqocmYKsZ03PhEyl3FJWlmmnWIc/Pob/4XuWmaxFamG77+ncX2PP9mu49YD20crN7Y1yYdUnRrbFO0LgQlRaqO8n8uVx+nIql3a4yurQUeFRcBaAW1cF3odYIs3IQHoc5i2rQkyrC/i8hGKLRR6xAXb8DWpag= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 62b96d2b-80c0-4a63-7e18-08d582ce67ab x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7193020); SRVR:KL1P15301MB0039; x-ms-traffictypediagnostic: KL1P15301MB0039: x-microsoft-antispam-prvs: <KL1P15301MB0039E7DBEF1DF1CE2CD9EF8DBFDA0@KL1P15301MB0039.APCP153.PROD.OUTLOOK.COM> x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:KL1P15301MB0039; BCL:0; PCL:0; RULEID:; SRVR:KL1P15301MB0039; x-forefront-prvs: 06022AA85F x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39380400002)(396003)(366004)(376002)(39860400002)(199004)(189003)(1076002)(7416002)(5660300001)(6116002)(316002)(76176011)(86362001)(106356001)(36756003)(4326008)(105586002)(2950100002)(77096007)(26005)(25786009)(3846002)(22452003)(110136005)(2201001)(99286004)(102836004)(6506007)(54906003)(186003)(86612001)(8936002)(66066001)(68736007)(3280700002)(81156014)(478600001)(1511001)(14454004)(8676002)(6436002)(81166006)(3660700001)(53936002)(2501003)(10290500003)(2906002)(6486002)(2900100001)(7736002)(6512007)(50226002)(305945005)(10090500001)(97736004)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1P15301MB0039; 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: NujxJ5Lmd8iw7dRzjKAsU/19Jw9MpiETkNgeSKd1e4mvtx6FHb0vF8dV4tRxXsO0yO8CMHMtdlum7HiXeOsYjvGEm+C7Xr9/I8QxixHmqnsiXXlNJdomccWNvB5FAzKw5FEG3gHDhOnTGFXV6eDRkxqbDQN0VzMdt2oQeAPntb+Rmub9t3ZUs232lRSaf7NEK+2x7MiMrbXT4KrK8YZP1XtA2DCCXNM/6Q+23hEnZkQcE/7NX82GCwUjBvYdLVOk6aT7t8sIxfKjoZyTazTW8HIqPddpOpjW+80lydykaLbtpDwbYmW/CpHzRBzKvYT+EyHPB/9fhEKBg1vTvGt87A== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62b96d2b-80c0-4a63-7e18-08d582ce67ab X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2018 19:22:15.1074 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1P15301MB0039 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 1233300f41c6..04edb24c92ee 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -1796,10 +1796,7 @@ static void hv_eject_device_work(struct work_struct *work) hpdev = container_of(work, struct hv_pci_dev, wrk); - if (hpdev->state != hv_pcichild_ejecting) { - put_pcichild(hpdev, hv_pcidev_ref_pnp); - return; - } + WARN_ON(hpdev->state != hv_pcichild_ejecting); /* * Ejection can come before or after the PCI bus has been set up, so
When we're in the function, hpdev->state must be hv_pcichild_ejecting: see hv_pci_eject_device(). Signed-off-by: Dexuan Cui <decui@microsoft.com> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Cc: Jack Morgenstein <jackm@mellanox.com> Cc: stable@vger.kernel.org Cc: Stephen Hemminger <sthemmin@microsoft.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Michael Kelley (EOSG) <Michael.H.Kelley@microsoft.com> --- drivers/pci/host/pci-hyperv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)