From: Wei Yongjun <weiyj.lk@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Keith Busch <keith.busch@intel.com>,
Jon Derrick <jonathan.derrick@intel.com>,
Vineet Gupta <vgupta@synopsys.com>,
Robin Murphy <robin.murphy@arm.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-pci@vger.kernel.org
Subject: [PATCH -next] x86/PCI: VMD: Remove unnecessary pci_set_drvdata()
Date: Mon, 17 Oct 2016 15:04:44 +0000 [thread overview]
Message-ID: <1476716684-6778-1-git-send-email-weiyj.lk@gmail.com> (raw)
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);
next reply other threads:[~2016-10-17 15:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 15:04 Wei Yongjun [this message]
2016-10-17 19:30 ` [PATCH -next] x86/PCI: VMD: Remove unnecessary pci_set_drvdata() Keith Busch
2016-11-11 21:52 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476716684-6778-1-git-send-email-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=bhelgaas@google.com \
--cc=jonathan.derrick@intel.com \
--cc=keith.busch@intel.com \
--cc=krzk@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=vgupta@synopsys.com \
--cc=weiyongjun1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.