[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BYAPR21MB1688B9918F1ACDBEBC9F24A2D7969@BYAPR21MB1688.namprd21.prod.outlook.com>
Date: Fri, 7 Apr 2023 16:05:58 +0000
From: "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
To: Dexuan Cui <decui@...rosoft.com>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Jake Oshins <jakeo@...rosoft.com>,
"kuba@...nel.org" <kuba@...nel.org>, "kw@...ux.com" <kw@...ux.com>,
KY Srinivasan <kys@...rosoft.com>,
"leon@...nel.org" <leon@...nel.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"lpieralisi@...nel.org" <lpieralisi@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"robh@...nel.org" <robh@...nel.org>,
"saeedm@...dia.com" <saeedm@...dia.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
Long Li <longli@...rosoft.com>,
"boqun.feng@...il.com" <boqun.feng@...il.com>,
Saurabh Singh Sengar <ssengar@...rosoft.com>,
"helgaas@...nel.org" <helgaas@...nel.org>
CC: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH v2 3/6] PCI: hv: Remove the useless hv_pcichild_state from
struct hv_pci_dev
From: Dexuan Cui <decui@...rosoft.com> Sent: Monday, April 3, 2023 7:06 PM
>
> The hpdev->state is never really useful. The only use in
> hv_pci_eject_device() and hv_eject_device_work() is not really necessary.
>
> Signed-off-by: Dexuan Cui <decui@...rosoft.com>
> Cc: stable@...r.kernel.org
> ---
> drivers/pci/controller/pci-hyperv.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> v2:
> No change to the patch body.
> Added Cc:stable
>
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 1b11cf7391933..46df6d093d683 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -553,19 +553,10 @@ struct hv_dr_state {
> struct hv_pcidev_description func[];
> };
>
> -enum hv_pcichild_state {
> - hv_pcichild_init = 0,
> - hv_pcichild_requirements,
> - hv_pcichild_resourced,
> - hv_pcichild_ejecting,
> - hv_pcichild_maximum
> -};
> -
> struct hv_pci_dev {
> /* List protected by pci_rescan_remove_lock */
> struct list_head list_entry;
> refcount_t refs;
> - enum hv_pcichild_state state;
> struct pci_slot *pci_slot;
> struct hv_pcidev_description desc;
> bool reported_missing;
> @@ -2750,8 +2741,6 @@ static void hv_eject_device_work(struct work_struct *work)
> hpdev = container_of(work, struct hv_pci_dev, wrk);
> hbus = hpdev->hbus;
>
> - WARN_ON(hpdev->state != hv_pcichild_ejecting);
> -
> /*
> * Ejection can come before or after the PCI bus has been set up, so
> * attempt to find it and tear down the bus state, if it exists. This
> @@ -2808,7 +2797,6 @@ static void hv_pci_eject_device(struct hv_pci_dev *hpdev)
> return;
> }
>
> - hpdev->state = hv_pcichild_ejecting;
> get_pcichild(hpdev);
> INIT_WORK(&hpdev->wrk, hv_eject_device_work);
> queue_work(hbus->wq, &hpdev->wrk);
> --
> 2.25.1
Reviewed-by: Michael Kelley <mikelley@...rosoft.com>
Powered by blists - more mailing lists