[dpdk-dev,v4,1/4] eal: make the comment more accurate

Message ID 1456451636-118476-2-git-send-email-huawei.xie@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Huawei Xie Feb. 26, 2016, 1:53 a.m. UTC
  positive return of rte_eal_pci_probe_one_driver means the driver doesn't support
the device.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_eal/common/eal_common_pci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

David Marchand Feb. 29, 2016, 8:48 a.m. UTC | #1
On Fri, Feb 26, 2016 at 2:53 AM, Huawei Xie <huawei.xie@intel.com> wrote:
> positive return of rte_eal_pci_probe_one_driver means the driver doesn't support
> the device.
>
> Signed-off-by: Huawei Xie <huawei.xie@intel.com>
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

Acked-by: David Marchand <david.marchand@6wind.com>
  

Patch

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 96d5113..797e7e3 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -204,7 +204,7 @@  rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d
 		/* call the driver devinit() function */
 		return dr->devinit(dr, dev);
 	}
-	/* return positive value if driver is not found */
+	/* return positive value if driver doesn't support this device */
 	return 1;
 }
 
@@ -259,7 +259,7 @@  rte_eal_pci_detach_dev(struct rte_pci_driver *dr,
 		return 0;
 	}
 
-	/* return positive value if driver is not found */
+	/* return positive value if driver doesn't support this device */
 	return 1;
 }
 
@@ -283,7 +283,7 @@  pci_probe_all_drivers(struct rte_pci_device *dev)
 			/* negative value is an error */
 			return -1;
 		if (rc > 0)
-			/* positive value means driver not found */
+			/* positive value means driver doesn't support it */
 			continue;
 		return 0;
 	}
@@ -310,7 +310,7 @@  pci_detach_all_drivers(struct rte_pci_device *dev)
 			/* negative value is an error */
 			return -1;
 		if (rc > 0)
-			/* positive value means driver not found */
+			/* positive value means driver doesn't support it */
 			continue;
 		return 0;
 	}