* [PATCH -next] x86/PCI: VMD: Remove unnecessary pci_set_drvdata()
@ 2016-10-17 15:04 Wei Yongjun
2016-10-17 19:30 ` Keith Busch
2016-11-11 21:52 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2016-10-17 15:04 UTC (permalink / raw)
To: Bjorn Helgaas, Krzysztof Kozlowski, Keith Busch, Jon Derrick,
Vineet Gupta, Robin Murphy
Cc: Wei Yongjun, linux-pci
From: Wei Yongjun <weiyongjun1@huawei.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/pci/host/vmd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c
index 37e29b5..6614b3552 100644
--- a/drivers/pci/host/vmd.c
+++ b/drivers/pci/host/vmd.c
@@ -719,7 +719,6 @@ static void vmd_remove(struct pci_dev *dev)
struct vmd_dev *vmd = pci_get_drvdata(dev);
vmd_detach_resources(vmd);
- pci_set_drvdata(dev, NULL);
sysfs_remove_link(&vmd->dev->dev.kobj, "domain");
pci_stop_root_bus(vmd->bus);
pci_remove_root_bus(vmd->bus);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] x86/PCI: VMD: Remove unnecessary pci_set_drvdata()
2016-10-17 15:04 [PATCH -next] x86/PCI: VMD: Remove unnecessary pci_set_drvdata() Wei Yongjun
@ 2016-10-17 19:30 ` Keith Busch
2016-11-11 21:52 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Keith Busch @ 2016-10-17 19:30 UTC (permalink / raw)
To: Wei Yongjun
Cc: Bjorn Helgaas, Krzysztof Kozlowski, Jon Derrick, Vineet Gupta,
Robin Murphy, Wei Yongjun, linux-pci
On Mon, Oct 17, 2016 at 03:04:44PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Looks good.
Reviewed-by: Keith Busch <keith.busch@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] x86/PCI: VMD: Remove unnecessary pci_set_drvdata()
2016-10-17 15:04 [PATCH -next] x86/PCI: VMD: Remove unnecessary pci_set_drvdata() Wei Yongjun
2016-10-17 19:30 ` Keith Busch
@ 2016-11-11 21:52 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2016-11-11 21:52 UTC (permalink / raw)
To: Wei Yongjun
Cc: Bjorn Helgaas, Krzysztof Kozlowski, Keith Busch, Jon Derrick,
Vineet Gupta, Robin Murphy, Wei Yongjun, linux-pci
On Mon, Oct 17, 2016 at 03:04:44PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied with Keith's reviewed-by to pci/host-vmd for v4.10, thanks!
> ---
> drivers/pci/host/vmd.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c
> index 37e29b5..6614b3552 100644
> --- a/drivers/pci/host/vmd.c
> +++ b/drivers/pci/host/vmd.c
> @@ -719,7 +719,6 @@ static void vmd_remove(struct pci_dev *dev)
> struct vmd_dev *vmd = pci_get_drvdata(dev);
>
> vmd_detach_resources(vmd);
> - pci_set_drvdata(dev, NULL);
> sysfs_remove_link(&vmd->dev->dev.kobj, "domain");
> pci_stop_root_bus(vmd->bus);
> pci_remove_root_bus(vmd->bus);
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-11 21:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 15:04 [PATCH -next] x86/PCI: VMD: Remove unnecessary pci_set_drvdata() Wei Yongjun
2016-10-17 19:30 ` Keith Busch
2016-11-11 21:52 ` Bjorn Helgaas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.