Thread (146 messages) 146 messages, 7 authors, 2017-04-14

Re: [PATCH v9 04/12] eal: remove loop over drivers in device detach

From: Shreyansh Jain <hidden>
Date: 2017-01-18 10:37:48

Thomas,

On Wednesday 18 January 2017 04:07 PM, Shreyansh Jain wrote:
quoted hunk ↗ jump to hunk
diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 4f155c6..7548ab0 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -259,15 +259,17 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr,
  * driver.
  */
 static int
-rte_eal_pci_detach_dev(struct rte_pci_driver *dr,
-		struct rte_pci_device *dev)
+rte_eal_pci_detach_dev(struct rte_pci_device *dev)
 {
 	int ret;
 	struct rte_pci_addr *loc;
+	struct rte_pci_driver *dr;

-	if ((dr == NULL) || (dev == NULL))
+	if ((dev == NULL))
There is a checkpatch warning here which missed my check (double
paranthesis). Let me know if you want me to send v10 for this.
Or, if there is anything major, I will send it along with that.
 		return -EINVAL;

+	dr = dev->driver;
+
 	ret = rte_pci_match(dr, dev);
 	if (ret) {
-
Shreyansh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help